pull/1207/head
Windpicker-owo 2025-08-21 14:41:00 +08:00
commit c41ad810e0
1 changed files with 1 additions and 3 deletions

View File

@ -70,9 +70,7 @@ class EventsManager:
message: Optional[MaiMessages]
) -> Coroutine[Any, Any, tuple[bool, bool, Any]]:
"""封装了调用 handler.execute 的逻辑。"""
if message:
return handler.execute(message)
return handler.execute() # 适用于 ON_START, ON_STOP
return handler.execute(message) if message else handler.execute()
def _dispatch_handler_task(self, handler: BaseEventHandler, message: Optional[MaiMessages]):
"""分发一个非阻塞(异步)的事件处理任务。"""