import{_ as s,c as a,a7 as t,o as n}from"./chunks/framework.jrU0lkHV.js";const u=JSON.parse('{"title":"liteyuki.dev.plugin","description":"","frontmatter":{"title":"liteyuki.dev.plugin"},"headers":[],"relativePath":"dev/api/dev/plugin.md","filePath":"zh/dev/api/dev/plugin.md","lastUpdated":null}'),l={name:"dev/api/dev/plugin.md"};function e(p,i,h,k,r,d){return n(),a("div",null,i[0]||(i[0]=[t(`

模块 liteyuki.dev.plugin

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


func run_plugins(*module_path: str | Path)

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

参数:

源代码在GitHub上查看
python
def run_plugins(*module_path: str | Path):
    cfg = load_config_in_default()
    plugins = cfg.get('liteyuki.plugins', [])
    plugins.extend(module_path)
    cfg['liteyuki.plugins'] = plugins
    bot = LiteyukiBot(**cfg)
    bot.run()
`,9)]))}const g=s(l,[["render",e]]);export{u as __pageData,g as default};