From bb2164c3244ad9e1a6b6b58c45c040abf82de491 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 25 Jul 2024 12:58:45 -0400 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=9C=A8=20context=20=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0message=5Fhandler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/bootstrap.py | 1 + type/types.py | 1 + 2 files changed, 2 insertions(+) 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,