Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
This commit is contained in:
@@ -70,9 +70,7 @@ class EventsManager:
|
|||||||
message: Optional[MaiMessages]
|
message: Optional[MaiMessages]
|
||||||
) -> Coroutine[Any, Any, tuple[bool, bool, Any]]:
|
) -> Coroutine[Any, Any, tuple[bool, bool, Any]]:
|
||||||
"""封装了调用 handler.execute 的逻辑。"""
|
"""封装了调用 handler.execute 的逻辑。"""
|
||||||
if message:
|
return handler.execute(message) if message else handler.execute()
|
||||||
return handler.execute(message)
|
|
||||||
return handler.execute() # 适用于 ON_START, ON_STOP
|
|
||||||
|
|
||||||
def _dispatch_handler_task(self, handler: BaseEventHandler, message: Optional[MaiMessages]):
|
def _dispatch_handler_task(self, handler: BaseEventHandler, message: Optional[MaiMessages]):
|
||||||
"""分发一个非阻塞(异步)的事件处理任务。"""
|
"""分发一个非阻塞(异步)的事件处理任务。"""
|
||||||
|
|||||||
Reference in New Issue
Block a user