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): """启动定时任务调度器"""