Skip to content

Commit 267ea8e

Browse files
fix bug with DM
1 parent 544344f commit 267ea8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import textwrap
1111
import requests
1212
from google.cloud import translate_v2 as translate
13+
from datetime import datetime, timezone
1314
from corpus import corpus
1415
from sympy import Symbol
1516
import plotly.graph_objs as go
@@ -344,7 +345,7 @@ def generate_markov_chain_convo_text(
344345
start_line: str = None,
345346
user_message: str = None,
346347
llm_bool: bool = False,
347-
user_time=7,
348+
user_time=None,
348349
) -> str | tuple[str, str, str]:
349350

350351
# Japan Standard Time (JST) timezone
@@ -357,6 +358,8 @@ def generate_markov_chain_convo_text(
357358
"My help might not always be helpful to you but helpful to me. ... *beep* \n"
358359
"So..."
359360
)
361+
if user_time is None:
362+
user_time = datetime.now(timezone.utc)
360363

361364
local_time = user_time.astimezone(japan_tz)
362365
selected_greeting = get_greeting(local_time)

0 commit comments

Comments
 (0)