fix: time module
This commit is contained in:
parent
498dd0b5fc
commit
65660e40ec
@ -77,9 +77,7 @@ async def on_preparing(event):
|
|||||||
|
|
||||||
@monitor.on("LIVE")
|
@monitor.on("LIVE")
|
||||||
async def on_live_start(event):
|
async def on_live_start(event):
|
||||||
beijing_tz = timezone(timedelta(hours=8))
|
current_hour = time.localtime().tm_hour
|
||||||
now = datetime.now(beijing_tz)
|
|
||||||
current_hour = now.hour
|
|
||||||
choices = ["直播开始啦,快来看魚宝!", "欢迎魚宝进入直播间!", "上班啦,魚宝今日顺利!"]
|
choices = ["直播开始啦,快来看魚宝!", "欢迎魚宝进入直播间!", "上班啦,魚宝今日顺利!"]
|
||||||
if 11 <= current_hour < 14:
|
if 11 <= current_hour < 14:
|
||||||
choices.append("魚宝中午好,吃饭了喵?")
|
choices.append("魚宝中午好,吃饭了喵?")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user