diff --git a/blivedm/handlers.py b/blivedm/handlers.py index 81c4301..3bcd51a 100644 --- a/blivedm/handlers.py +++ b/blivedm/handlers.py @@ -118,6 +118,8 @@ class BaseHandler(HandlerInterface): if pos != -1: cmd = cmd[:pos] + self._global_callback(client, command) + if cmd not in self._CMD_CALLBACK_DICT: # 只有第一次遇到未知cmd时打日志 if cmd not in logged_unknown_cmds: @@ -129,8 +131,6 @@ class BaseHandler(HandlerInterface): if callback is not None: callback(self, client, command) - self._global_callback(client, command) - def _global_callback(self, client: ws_base.WebSocketClientBase, message: dict): pass