diff --git a/astrbot/bootstrap.py b/astrbot/bootstrap.py index bba35447b..200d25961 100644 --- a/astrbot/bootstrap.py +++ b/astrbot/bootstrap.py @@ -65,6 +65,7 @@ class AstrBotBootstrap(): self.context.metrics_uploader = self.metrics_uploader self.context.updator = self.updator self.context.plugin_updator = self.plugin_manager.updator + self.context.message_handler = self.message_handler # load plugins, plugins' commands. self.load_plugins() diff --git a/type/types.py b/type/types.py index 8773bfb48..78b058970 100644 --- a/type/types.py +++ b/type/types.py @@ -37,6 +37,7 @@ class Context: self.plugin_command_bridge = PluginCommandBridge(self.cached_plugins) self.image_renderer = TextToImageRenderer() self.image_uploader = ImageUploader() + self.message_handler = None # see astrbot/message/handler.py def register_commands(self, plugin_name: str,