From 453483fb5bf0fbd774ecf3d1a339acd050ba15c4 Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Tue, 18 Nov 2025 14:24:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=A4=9A=E9=80=82=E9=85=8D=E5=99=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81):=20=E5=A4=84=E7=90=86=20Bot=20=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B=E4=B8=8E=E5=B9=B3=E5=8F=B0=20ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/message_handler.py | 2 +- src/scheduler/auto_scheduler.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/message_handler.py b/src/core/message_handler.py index 750ab7e..9a86c24 100644 --- a/src/core/message_handler.py +++ b/src/core/message_handler.py @@ -47,7 +47,7 @@ class MessageHandler: return None async def fetch_group_messages( - self, bot_instance, group_id: str, days: int + self, bot_instance, group_id: str, days: int, platform_id: str = None ) -> List[Dict]: """获取群聊消息记录""" try: diff --git a/src/scheduler/auto_scheduler.py b/src/scheduler/auto_scheduler.py index bb848cb..2b140a2 100644 --- a/src/scheduler/auto_scheduler.py +++ b/src/scheduler/auto_scheduler.py @@ -79,12 +79,12 @@ class AutoScheduler: logger.warning(f"使用默认平台: {first_platform}") return first_platform - # 回退到默认值 - logger.warning(f"⚠️ 没有注册的bot实例,使用默认平台 'default'") - return "default" + # 没有任何bot实例,返回None + logger.error(f"❌ 没有注册的bot实例") + return None except Exception as e: logger.error(f"❌ 获取平台ID失败: {e}") - return "default" + return None async def start_scheduler(self): """启动定时任务调度器"""