From 322297a69cb295e76fd87025c2d9be6f5845319a Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 20 May 2025 14:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8F=92=E4=BB=B6=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- plugins/game_task/main.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index e76404d..a4d88c7 100644 --- a/main.py +++ b/main.py @@ -108,7 +108,7 @@ def jobs(robot: Robot): # await robot.xiu_ren_pdf_send() # ✅ 每 3 小时登录验证 - @async_job.at_times(["14:42"]) + @async_job.at_times(["14:43"]) async def login_check_job(): robot.login_twice_auto_auth() diff --git a/plugins/game_task/main.py b/plugins/game_task/main.py index a050866..e1c747a 100644 --- a/plugins/game_task/main.py +++ b/plugins/game_task/main.py @@ -47,7 +47,7 @@ class GameTaskPlugin(MessagePluginInterface): super().__init__() self.LOG = logger self.bot: WechatAPIClient = None - async_job.at_times(["14:40"])(self.run_random_task_assignment) + async_job.at_times(["14:43"])(self.run_random_task_assignment) def initialize(self, context: Dict[str, Any]) -> bool: """初始化插件""" @@ -516,9 +516,8 @@ class GameTaskPlugin(MessagePluginInterface): # 获取所有群聊 groups = self.encyclopedia_db.get_all_groups() for group in groups: - group_id = group['group_id'] # 获取群内所有玩家 - players = self.encyclopedia_db.get_all_players_in_group(group_id) + players = self.encyclopedia_db.get_all_players_in_group(group) if not players: continue @@ -537,12 +536,12 @@ class GameTaskPlugin(MessagePluginInterface): # 创建活跃任务 active_task_id = self.encyclopedia_db.create_active_task( - group_id, question, answer, score, description, holder_id + group, question, answer, score, description, holder_id ) if active_task_id: await self.bot.send_text_message( - group_id, + group, f"🎁 新任务来袭,够不够刺激?\n" f"🎀 任务ID: {active_task_id}\n" f"🌟 幸运鹅:{holder_name}\n"