From 65660e40ece50ebd7f5bd1d4be5b215522c2ac4f Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Thu, 31 Oct 2024 21:04:19 +0800 Subject: [PATCH] fix: time module --- bilibot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bilibot.py b/bilibot.py index 6eeb90a..d063724 100644 --- a/bilibot.py +++ b/bilibot.py @@ -77,9 +77,7 @@ async def on_preparing(event): @monitor.on("LIVE") async def on_live_start(event): - beijing_tz = timezone(timedelta(hours=8)) - now = datetime.now(beijing_tz) - current_hour = now.hour + current_hour = time.localtime().tm_hour choices = ["直播开始啦,快来看魚宝!", "欢迎魚宝进入直播间!", "上班啦,魚宝今日顺利!"] if 11 <= current_hour < 14: choices.append("魚宝中午好,吃饭了喵?")