import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.BZiUP1E-.js";const E=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"en/dev/api/dev/plugin.md","filePath":"en/dev/api/dev/plugin.md","lastUpdated":1725101868000}'),n={name:"en/dev/api/dev/plugin.md"},e=t(`

liteyuki.dev.plugin

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : snowykami@outlook.com @File : plugin.py @Software: PyCharm

def run_plugins(*module_path: str | Path)

Description: 运行插件,无需手动初始化bot

Arguments:

Source code or View on GitHub
python
def run_plugins(*module_path: str | Path):
    """
    运行插件,无需手动初始化bot
    Args:
        module_path: 插件路径,参考\`liteyuki.load_plugin\`的函数签名
    """
    cfg = load_config_in_default()
    plugins = cfg.get('liteyuki.plugins', [])
    plugins.extend(module_path)
    cfg['liteyuki.plugins'] = plugins
    bot = LiteyukiBot(**cfg)
    bot.run()
`,8),l=[e];function p(h,k,r,o,d,u){return a(),s("div",null,l)}const c=i(n,[["render",p]]);export{E as __pageData,c as default};