mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 20:01:04 +00:00
fix(多适配器支持): 处理 Bot 实例与平台 ID
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
"""启动定时任务调度器"""
|
||||
|
||||
Reference in New Issue
Block a user