forked from bot/app
✨ 新增开发者模式,快速运行插件
This commit is contained in:
parent
87d4202ed3
commit
78810d2ca8
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user