diff --git a/liteyuki/dev/plugin.py b/liteyuki/dev/plugin.py index b4ddc896..c541bba2 100644 --- a/liteyuki/dev/plugin.py +++ b/liteyuki/dev/plugin.py @@ -21,6 +21,8 @@ def run_plugins(*module_path: str | Path): module_path: 插件路径,参考`liteyuki.load_plugin`的函数签名 """ cfg = load_config_in_default() - cfg["liteyuki.plugins"] = cfg.get("liteyuki.plugins", []).extend(module_path) + plugins = cfg.get("liteyuki.plugins", []) + plugins.extend(module_path) + cfg["liteyuki.plugins"] = plugins bot = LiteyukiBot(**cfg) bot.run()