perf: 在 context 中添加message_handler
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user