1
0
forked from bot/app

新增开发者模式,快速运行插件

This commit is contained in:
远野千束 2024-08-18 05:19:52 +08:00
parent 87d4202ed3
commit 78810d2ca8

View File

@ -21,6 +21,8 @@ def run_plugins(*module_path: str | Path):
module_path: 插件路径参考`liteyuki.load_plugin`的函数签名 module_path: 插件路径参考`liteyuki.load_plugin`的函数签名
""" """
cfg = load_config_in_default() 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 = LiteyukiBot(**cfg)
bot.run() bot.run()