事件工厂111

This commit is contained in:
2026-01-01 18:43:14 +08:00
parent 046dd0860f
commit 3ba15d38f9
15 changed files with 1017 additions and 245 deletions

View File

@@ -73,6 +73,23 @@ class CommandManager:
return decorator
# --- 统一事件分发入口 ---
async def handle_event(self, bot, event):
"""
统一事件分发入口
:param bot: Bot 实例
:param event: 事件对象
"""
post_type = event.post_type
if post_type == 'message':
await self.handle_message(bot, event)
elif post_type == 'notice':
await self.handle_notice(bot, event)
elif post_type == 'request':
await self.handle_request(bot, event)
# --- 消息分发逻辑 ---
async def handle_message(self, bot, event):
"""