forked from bot/app
10 lines
5.0 KiB
JavaScript
10 lines
5.0 KiB
JavaScript
import{_ as n,o as e,c as t,e as a}from"./app-BvUYPzLF.js";const s={},i=a(`<h1 id="liteyuki-plugins-plugin-loader" tabindex="-1"><a class="header-anchor" href="#liteyuki-plugins-plugin-loader"><span>liteyuki.plugins.plugin_loader</span></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File : <strong>init</strong>.py.py @Software: PyCharm</p><h3 id="def-default-plugins-loader" tabindex="-1"><a class="header-anchor" href="#def-default-plugins-loader"><span><em><strong>def</strong></em> <code>default_plugins_loader()</code></span></a></h3><p><strong>说明</strong>: 默认插件加载器,应在初始化时调用</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugins/plugin_loader/__init__.py#L21" target="_blank">在GitHub上查看</a></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">default_plugins_loader</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
|
<span class="token triple-quoted-string string">"""
|
|
默认插件加载器,应在初始化时调用
|
|
"""</span>
|
|
<span class="token keyword">for</span> plugin <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">'liteyuki.plugins'</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
|
load_plugin<span class="token punctuation">(</span>plugin<span class="token punctuation">)</span>
|
|
<span class="token keyword">for</span> plugin_dir <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">'liteyuki.plugin_dirs'</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">'src/liteyuki_plugins'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
|
load_plugins<span class="token punctuation">(</span>plugin_dir<span class="token punctuation">)</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,6),o=[i];function l(p,u){return e(),t("div",null,o)}const d=n(s,[["render",l],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/dev/api/plugins/plugin_loader/","title":"liteyuki.plugins.plugin_loader","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugins.plugin_loader","lastUpdated":false,"description":"liteyuki.plugins.plugin_loader 说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/plugin_loader/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugins/plugin_loader/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugins.plugin_loader"}],["meta",{"property":"og:description","content":"liteyuki.plugins.plugin_loader 说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved @Time : 2024/8/11 下午10:02 @Author : snowykami @Email : snowykami@outlook.com @File..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.plugin_loader\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def default_plugins_loader()","slug":"def-default-plugins-loader","link":"#def-default-plugins-loader","children":[]}],"git":{"createdTime":1724912379000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.35,"words":104},"filePathRelative":"dev/api/plugins/plugin_loader/README.md","localizedDate":"2024年8月29日","autoDesc":true}');export{d as comp,c as data};
|