forked from bot/app
Deploying to docs from @ LiteyukiStudio/LiteyukiBot@ae34ff622d 🚀
This commit is contained in:
parent
44a7c3ad08
commit
63f3895009
@ -1 +1 @@
|
||||
import{t as p}from"./chunks/theme.DMJ5TBe0.js";import{U as o,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as g,ad as A,ae as y,d as P,u as v,y as C,x as b,af as w,ag as E,ah as R,ai as S}from"./chunks/framework.C3o_UkTa.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp};
|
||||
import{t as p}from"./chunks/theme.B7R8TMqw.js";import{U as o,a8 as u,a9 as l,aa as c,ab as f,ac as d,ad as m,ae as h,af as g,ag as A,ah as y,d as P,u as v,y as C,x as b,ai as w,aj as E,ak as R,al as S}from"./chunks/framework.BZiUP1E-.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function j(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(l,e);const t=c(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function x(){return g(T)}function D(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&j().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{j as createApp};
|
File diff suppressed because one or more lines are too long
1
assets/chunks/@localSearchIndexen.qQMdgzP9.js
Normal file
1
assets/chunks/@localSearchIndexen.qQMdgzP9.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/chunks/@localSearchIndexroot.nwu2FQmX.js
Normal file
1
assets/chunks/@localSearchIndexroot.nwu2FQmX.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n(`<h1 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to "配置""></a></h1><p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><strong>基础配置项</strong> <a class="header-anchor" href="#基础配置项" aria-label="Permalink to "**基础配置项**""></a></h2><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">nonebot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n(`<h1 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to "配置""></a></h1><p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><strong>基础配置项</strong> <a class="header-anchor" href="#基础配置项" aria-label="Permalink to "**基础配置项**""></a></h2><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">nonebot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> command_start</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [ </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ] </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> host</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">127.0.0.1</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n("",15),h=[l];function e(k,p,d,o,r,E){return a(),i("div",null,h)}const y=s(t,[["render",e]]);export{g as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{"title":"配置","order":2},"headers":[],"relativePath":"deploy/config.md","filePath":"zh/deploy/config.md","lastUpdated":1725101868000}'),t={name:"deploy/config.md"},l=n("",15),h=[l];function e(k,p,d,o,r,E){return a(),i("div",null,h)}const y=s(t,[["render",e]]);export{g as __pageData,y as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const m=JSON.parse('{"title":"答疑","description":"","frontmatter":{"title":"答疑","order":3},"headers":[],"relativePath":"deploy/fandq.md","filePath":"zh/deploy/fandq.md","lastUpdated":1725101868000}'),r={name:"deploy/fandq.md"},n=a("",10),l=[n];function i(c,h,d,p,s,u){return t(),o("div",null,l)}const g=e(r,[["render",i]]);export{m as __pageData,g as default};
|
||||
import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BZiUP1E-.js";const m=JSON.parse('{"title":"答疑","description":"","frontmatter":{"title":"答疑","order":3},"headers":[],"relativePath":"deploy/fandq.md","filePath":"zh/deploy/fandq.md","lastUpdated":1725101868000}'),r={name:"deploy/fandq.md"},n=a("",10),l=[n];function i(c,h,d,p,s,u){return t(),o("div",null,l)}const g=e(r,[["render",i]]);export{m as __pageData,g as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s(`<h1 id="安装" tabindex="-1">安装 <a class="header-anchor" href="#安装" aria-label="Permalink to "安装""></a></h1><h2 id="常规部署" tabindex="-1"><strong>常规部署</strong> <a class="header-anchor" href="#常规部署" aria-label="Permalink to "**常规部署**""></a></h2><ol><li>安装 <a href="https://git-scm.com/download/" target="_blank" rel="noreferrer"><code>Git</code></a> 和 <a href="https://www.python.org/downloads/release/python-31010/" target="_blank" rel="noreferrer"><code>Python3.10+</code></a> 环境</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项</span></span>
|
||||
import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s(`<h1 id="安装" tabindex="-1">安装 <a class="header-anchor" href="#安装" aria-label="Permalink to "安装""></a></h1><h2 id="常规部署" tabindex="-1"><strong>常规部署</strong> <a class="header-anchor" href="#常规部署" aria-label="Permalink to "**常规部署**""></a></h2><ol><li>安装 <a href="https://git-scm.com/download/" target="_blank" rel="noreferrer"><code>Git</code></a> 和 <a href="https://www.python.org/downloads/release/python-31010/" target="_blank" rel="noreferrer"><code>Python3.10+</code></a> 环境</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/LiteyukiStudio/LiteyukiBot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --depth=1</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 切换到Bot目录下</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> LiteyukiBot</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s("",15),l=[o];function n(c,d,r,h,p,k){return t(),e("div",null,l)}const b=i(a,[["render",n]]);export{g as __pageData,b as default};
|
||||
import{_ as i,c as e,o as t,a4 as s}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"安装","description":"","frontmatter":{"title":"安装","order":1},"headers":[],"relativePath":"deploy/install.md","filePath":"zh/deploy/install.md","lastUpdated":1725102337000}'),a={name:"deploy/install.md"},o=s("",15),l=[o];function n(c,d,r,h,p,k){return t(),e("div",null,l)}const b=i(a,[["render",n]]);export{g as __pageData,b as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i('<h1 id="liteyuki" tabindex="-1">liteyuki <a class="header-anchor" href="#liteyuki" aria-label="Permalink to "liteyuki""></a></h1><h3 id="var-version" tabindex="-1">var <code>__version__</code> <a class="header-anchor" href="#var-version" aria-label="Permalink to "var `__version__`""></a></h3><ul><li><p><strong>说明</strong>: 测试版本号</p></li><li><p><strong>默认值</strong>: <code>'6.3.10'</code></p></li></ul>',3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default};
|
||||
import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.BZiUP1E-.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i('<h1 id="liteyuki" tabindex="-1">liteyuki <a class="header-anchor" href="#liteyuki" aria-label="Permalink to "liteyuki""></a></h1><h3 id="var-version" tabindex="-1">var <code>__version__</code> <a class="header-anchor" href="#var-version" aria-label="Permalink to "var `__version__`""></a></h3><ul><li><p><strong>说明</strong>: 测试版本号</p></li><li><p><strong>默认值</strong>: <code>'6.3.10'</code></p></li></ul>',3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i("",3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default};
|
||||
import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.BZiUP1E-.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/api.md","filePath":"zh/dev/api/api.md","lastUpdated":null}'),o={name:"dev/api/api.md"},r=i("",3),l=[r];function s(_,n,d,c,p,u){return t(),a("div",null,l)}const m=e(o,[["render",s]]);export{v as __pageData,m as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},e=n(`<h1 id="liteyuki-bot" tabindex="-1">liteyuki.bot <a class="header-anchor" href="#liteyuki-bot" aria-label="Permalink to "liteyuki.bot""></a></h1><h3 id="class-liteyukibot" tabindex="-1"><em><strong>class</strong></em> <code>LiteyukiBot</code> <a class="header-anchor" href="#class-liteyukibot" aria-label="Permalink to "***class*** \`LiteyukiBot\`""></a></h3><h4 id="def-init-self-kwargs-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, **kwargs) -> None</code> <a class="header-anchor" href="#def-init-self-kwargs-none" aria-label="Permalink to "***def*** \`__init__(self, **kwargs) -> None\`""></a></h4><p><strong>说明</strong>: 初始化轻雪实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>**kwargs: 配置</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/__init__.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">kwargs) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},e=n(`<h1 id="liteyuki-bot" tabindex="-1">liteyuki.bot <a class="header-anchor" href="#liteyuki-bot" aria-label="Permalink to "liteyuki.bot""></a></h1><h3 id="class-liteyukibot" tabindex="-1"><em><strong>class</strong></em> <code>LiteyukiBot</code> <a class="header-anchor" href="#class-liteyukibot" aria-label="Permalink to "***class*** \`LiteyukiBot\`""></a></h3><h4 id="def-init-self-kwargs-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, **kwargs) -> None</code> <a class="header-anchor" href="#def-init-self-kwargs-none" aria-label="Permalink to "***def*** \`__init__(self, **kwargs) -> None\`""></a></h4><p><strong>说明</strong>: 初始化轻雪实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>**kwargs: 配置</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/__init__.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">kwargs) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 初始化轻雪实例</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},e=n("",86),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/bot.md","filePath":"zh/dev/api/bot/bot.md","lastUpdated":null}'),t={name:"dev/api/bot/bot.md"},e=n("",86),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},e=n(`<h1 id="liteyuki-bot" tabindex="-1">liteyuki.bot <a class="header-anchor" href="#liteyuki-bot" aria-label="Permalink to "liteyuki.bot""></a></h1><h3 id="class-liteyukibot" tabindex="-1"><em><strong>class</strong></em> <code>LiteyukiBot</code> <a class="header-anchor" href="#class-liteyukibot" aria-label="Permalink to "***class*** \`LiteyukiBot\`""></a></h3><h4 id="def-init-self-kwargs-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, **kwargs) -> None</code> <a class="header-anchor" href="#def-init-self-kwargs-none" aria-label="Permalink to "***def*** \`__init__(self, **kwargs) -> None\`""></a></h4><p><strong>说明</strong>: 初始化轻雪实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>**kwargs: 配置</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/__init__.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">kwargs) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},e=n(`<h1 id="liteyuki-bot" tabindex="-1">liteyuki.bot <a class="header-anchor" href="#liteyuki-bot" aria-label="Permalink to "liteyuki.bot""></a></h1><h3 id="class-liteyukibot" tabindex="-1"><em><strong>class</strong></em> <code>LiteyukiBot</code> <a class="header-anchor" href="#class-liteyukibot" aria-label="Permalink to "***class*** \`LiteyukiBot\`""></a></h3><h4 id="def-init-self-kwargs-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, **kwargs) -> None</code> <a class="header-anchor" href="#def-init-self-kwargs-none" aria-label="Permalink to "***def*** \`__init__(self, **kwargs) -> None\`""></a></h4><p><strong>说明</strong>: 初始化轻雪实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>**kwargs: 配置</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/__init__.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">kwargs) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 初始化轻雪实例</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},e=n("",86),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.bot","description":"","frontmatter":{"title":"liteyuki.bot","collapsed":true},"headers":[],"relativePath":"dev/api/bot/index.md","filePath":"zh/dev/api/bot/index.md","lastUpdated":null}'),t={name:"dev/api/bot/index.md"},e=n("",86),l=[e];function p(h,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n(`<h1 id="liteyuki-bot-lifespan" tabindex="-1">liteyuki.bot.lifespan <a class="header-anchor" href="#liteyuki-bot-lifespan" aria-label="Permalink to "liteyuki.bot.lifespan""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : lifespan.py @Software: PyCharm</p><h3 id="var-sync-lifespan-func" tabindex="-1">var <code>SYNC_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-sync-lifespan-func" aria-label="Permalink to "var \`SYNC_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 同步生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[], Any]</code></p></li></ul><h3 id="var-async-lifespan-func" tabindex="-1">var <code>ASYNC_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-async-lifespan-func" aria-label="Permalink to "var \`ASYNC_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 异步生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[], Awaitable[Any]]</code></p></li></ul><h3 id="var-lifespan-func" tabindex="-1">var <code>LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-lifespan-func" aria-label="Permalink to "var \`LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>SYNC_LIFESPAN_FUNC | ASYNC_LIFESPAN_FUNC</code></p></li></ul><h3 id="var-sync-process-lifespan-func" tabindex="-1">var <code>SYNC_PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-sync-process-lifespan-func" aria-label="Permalink to "var \`SYNC_PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 同步进程生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[str], Any]</code></p></li></ul><h3 id="var-async-process-lifespan-func" tabindex="-1">var <code>ASYNC_PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-async-process-lifespan-func" aria-label="Permalink to "var \`ASYNC_PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 异步进程生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[str], Awaitable[Any]]</code></p></li></ul><h3 id="var-process-lifespan-func" tabindex="-1">var <code>PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-process-lifespan-func" aria-label="Permalink to "var \`PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 进程函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>SYNC_PROCESS_LIFESPAN_FUNC | ASYNC_PROCESS_LIFESPAN_FUNC</code></p></li></ul><h3 id="class-lifespan" tabindex="-1"><em><strong>class</strong></em> <code>Lifespan</code> <a class="header-anchor" href="#class-lifespan" aria-label="Permalink to "***class*** \`Lifespan\`""></a></h3><h4 id="def-init-self-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#def-init-self-none" aria-label="Permalink to "***def*** \`__init__(self) -> None\`""></a></h4><p><strong>说明</strong>: 轻雪生命周期管理,启动、停止、重启</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/lifespan.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const E=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n(`<h1 id="liteyuki-bot-lifespan" tabindex="-1">liteyuki.bot.lifespan <a class="header-anchor" href="#liteyuki-bot-lifespan" aria-label="Permalink to "liteyuki.bot.lifespan""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/23 下午8:24 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : lifespan.py @Software: PyCharm</p><h3 id="var-sync-lifespan-func" tabindex="-1">var <code>SYNC_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-sync-lifespan-func" aria-label="Permalink to "var \`SYNC_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 同步生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[], Any]</code></p></li></ul><h3 id="var-async-lifespan-func" tabindex="-1">var <code>ASYNC_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-async-lifespan-func" aria-label="Permalink to "var \`ASYNC_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 异步生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[], Awaitable[Any]]</code></p></li></ul><h3 id="var-lifespan-func" tabindex="-1">var <code>LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-lifespan-func" aria-label="Permalink to "var \`LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>SYNC_LIFESPAN_FUNC | ASYNC_LIFESPAN_FUNC</code></p></li></ul><h3 id="var-sync-process-lifespan-func" tabindex="-1">var <code>SYNC_PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-sync-process-lifespan-func" aria-label="Permalink to "var \`SYNC_PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 同步进程生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[str], Any]</code></p></li></ul><h3 id="var-async-process-lifespan-func" tabindex="-1">var <code>ASYNC_PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-async-process-lifespan-func" aria-label="Permalink to "var \`ASYNC_PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 异步进程生命周期函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[str], Awaitable[Any]]</code></p></li></ul><h3 id="var-process-lifespan-func" tabindex="-1">var <code>PROCESS_LIFESPAN_FUNC</code> <a class="header-anchor" href="#var-process-lifespan-func" aria-label="Permalink to "var \`PROCESS_LIFESPAN_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 进程函数</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>SYNC_PROCESS_LIFESPAN_FUNC | ASYNC_PROCESS_LIFESPAN_FUNC</code></p></li></ul><h3 id="class-lifespan" tabindex="-1"><em><strong>class</strong></em> <code>Lifespan</code> <a class="header-anchor" href="#class-lifespan" aria-label="Permalink to "***class*** \`Lifespan\`""></a></h3><h4 id="def-init-self-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#def-init-self-none" aria-label="Permalink to "***def*** \`__init__(self) -> None\`""></a></h4><p><strong>说明</strong>: 轻雪生命周期管理,启动、停止、重启</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/lifespan.py#L27" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 轻雪生命周期管理,启动、停止、重启</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const E=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n("",79),l=[e];function p(h,k,r,o,d,c){return a(),i("div",null,l)}const u=s(t,[["render",p]]);export{E as __pageData,u as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const E=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"dev/api/bot/lifespan.md","filePath":"zh/dev/api/bot/lifespan.md","lastUpdated":null}'),t={name:"dev/api/bot/lifespan.md"},e=n("",79),l=[e];function p(h,k,r,o,d,c){return a(),i("div",null,l)}const u=s(t,[["render",p]]);export{E as __pageData,u as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"dev/api/comm/channel.md","filePath":"zh/dev/api/comm/channel.md","lastUpdated":null}'),l={name:"dev/api/comm/channel.md"},e=n("",82),t=[e];function h(p,k,r,d,c,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.comm.channel","description":"","frontmatter":{"title":"liteyuki.comm.channel"},"headers":[],"relativePath":"dev/api/comm/channel.md","filePath":"zh/dev/api/comm/channel.md","lastUpdated":null}'),l={name:"dev/api/comm/channel.md"},e=n("",82),t=[e];function h(p,k,r,d,c,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default};
|
||||
import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default};
|
@ -1 +1 @@
|
||||
import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default};
|
||||
import{_ as o,c as a,o as c,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/comm.md","filePath":"zh/dev/api/comm/comm.md","lastUpdated":null}'),m={name:"dev/api/comm/comm.md"},i=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),s=[i,n];function l(r,d,_,p,u,h){return c(),a("div",null,s)}const v=o(m,[["render",l]]);export{k as __pageData,v as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),e={name:"dev/api/comm/event.md"},n=i('<h1 id="liteyuki-comm-event" tabindex="-1">liteyuki.comm.event <a class="header-anchor" href="#liteyuki-comm-event" aria-label="Permalink to "liteyuki.comm.event""></a></h1><p><strong>说明</strong>: 本模块用于轻雪主进程和子进程之间的通信的事件类</p><h3 id="class-event" tabindex="-1"><em><strong>class</strong></em> <code>Event</code> <a class="header-anchor" href="#class-event" aria-label="Permalink to "***class*** `Event`""></a></h3><h4 id="def-init-self-name-str-data-dict-str-any" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, name: str, data: dict[str, Any])</code> <a class="header-anchor" href="#def-init-self-name-str-data-dict-str-any" aria-label="Permalink to "***def*** `__init__(self, name: str, data: dict[str, Any])`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/event.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, data: dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]):</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.name </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> name</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.data </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> data</span></span></code></pre></div></details>',5),l=[n];function h(d,r,o,p,k,c){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
||||
import{_ as s,c as a,o as t,a4 as i}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),e={name:"dev/api/comm/event.md"},n=i('<h1 id="liteyuki-comm-event" tabindex="-1">liteyuki.comm.event <a class="header-anchor" href="#liteyuki-comm-event" aria-label="Permalink to "liteyuki.comm.event""></a></h1><p><strong>说明</strong>: 本模块用于轻雪主进程和子进程之间的通信的事件类</p><h3 id="class-event" tabindex="-1"><em><strong>class</strong></em> <code>Event</code> <a class="header-anchor" href="#class-event" aria-label="Permalink to "***class*** `Event`""></a></h3><h4 id="def-init-self-name-str-data-dict-str-any" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, name: str, data: dict[str, Any])</code> <a class="header-anchor" href="#def-init-self-name-str-data-dict-str-any" aria-label="Permalink to "***def*** `__init__(self, name: str, data: dict[str, Any])`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/event.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, data: dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]):</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.name </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> name</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.data </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> data</span></span></code></pre></div></details>',5),l=[n];function h(d,r,o,p,k,c){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as a,o as t,a4 as i}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),e={name:"dev/api/comm/event.md"},n=i("",5),l=[n];function h(d,r,o,p,k,c){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
||||
import{_ as s,c as a,o as t,a4 as i}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.comm.event","description":"","frontmatter":{"title":"liteyuki.comm.event"},"headers":[],"relativePath":"dev/api/comm/event.md","filePath":"zh/dev/api/comm/event.md","lastUpdated":null}'),e={name:"dev/api/comm/event.md"},n=i("",5),l=[n];function h(d,r,o,p,k,c){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default};
|
||||
import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default};
|
||||
import{_ as a,c as o,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const k=JSON.parse('{"title":"liteyuki.comm","description":"","frontmatter":{"title":"liteyuki.comm","collapsed":true},"headers":[],"relativePath":"dev/api/comm/index.md","filePath":"zh/dev/api/comm/index.md","lastUpdated":null}'),n={name:"dev/api/comm/index.md"},c=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[t("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": 该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage")],-1),l=[c,s];function r(d,m,_,p,u,h){return i(),o("div",null,l)}const x=a(n,[["render",r]]);export{k as __pageData,x as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t('<h1 id="liteyuki-comm-rpc" tabindex="-1">liteyuki.comm.rpc <a class="header-anchor" href="#liteyuki-comm-rpc" aria-label="Permalink to "liteyuki.comm.rpc""></a></h1><p><strong>说明</strong>: 本模块用于实现RPC(基于IPC)通信</p><h3 id="class-rpc" tabindex="-1"><em><strong>class</strong></em> <code>RPC</code> <a class="header-anchor" href="#class-rpc" aria-label="Permalink to "***class*** `RPC`""></a></h3><h4 id="def-init-self-on-calling-on-calling-func-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</code> <a class="header-anchor" href="#def-init-self-on-calling-on-calling-func-none" aria-label="Permalink to "***def*** `__init__(self, on_calling: ON_CALLING_FUNC) -> None`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, on_calling: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">ON_CALLING_FUNC</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.on_calling </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> on_calling</span></span></code></pre></div></details><h4 id="def-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><em><strong>def</strong></em> <code>call(self, args: tuple, kwargs: dict) -> Any</code> <a class="header-anchor" href="#def-call-self-args-tuple-kwargs-dict-any" aria-label="Permalink to "***def*** `call(self, args: tuple, kwargs: dict) -> Any`""></a></h4><p><strong>说明</strong>: 调用</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L21" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, args: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, kwargs: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">dict</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> Any:</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 调用</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.on_calling(args, kwargs)</span></span></code></pre></div></details>',8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default};
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.BZiUP1E-.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t('<h1 id="liteyuki-comm-rpc" tabindex="-1">liteyuki.comm.rpc <a class="header-anchor" href="#liteyuki-comm-rpc" aria-label="Permalink to "liteyuki.comm.rpc""></a></h1><p><strong>说明</strong>: 本模块用于实现RPC(基于IPC)通信</p><h3 id="class-rpc" tabindex="-1"><em><strong>class</strong></em> <code>RPC</code> <a class="header-anchor" href="#class-rpc" aria-label="Permalink to "***class*** `RPC`""></a></h3><h4 id="def-init-self-on-calling-on-calling-func-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</code> <a class="header-anchor" href="#def-init-self-on-calling-on-calling-func-none" aria-label="Permalink to "***def*** `__init__(self, on_calling: ON_CALLING_FUNC) -> None`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, on_calling: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">ON_CALLING_FUNC</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.on_calling </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> on_calling</span></span></code></pre></div></details><h4 id="def-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><em><strong>def</strong></em> <code>call(self, args: tuple, kwargs: dict) -> Any</code> <a class="header-anchor" href="#def-call-self-args-tuple-kwargs-dict-any" aria-label="Permalink to "***def*** `call(self, args: tuple, kwargs: dict) -> Any`""></a></h4><p><strong>说明</strong>: 调用</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/rpc.py#L21" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, args: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, kwargs: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">dict</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> Any:</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 调用</span></span>\n<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.on_calling(args, kwargs)</span></span></code></pre></div></details>',8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t("",8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default};
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.BZiUP1E-.js";const u=JSON.parse('{"title":"liteyuki.comm.rpc","description":"","frontmatter":{"title":"liteyuki.comm.rpc"},"headers":[],"relativePath":"dev/api/comm/rpc.md","filePath":"zh/dev/api/comm/rpc.md","lastUpdated":null}'),e={name:"dev/api/comm/rpc.md"},n=t("",8),l=[n];function p(h,r,o,c,k,d){return a(),i("div",null,l)}const m=s(e,[["render",p]]);export{u as __pageData,m as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),e={name:"dev/api/comm/socks_channel.md"},t=n(`<h1 id="liteyuki-comm-socks-channel" tabindex="-1">liteyuki.comm.socks_channel <a class="header-anchor" href="#liteyuki-comm-socks-channel" aria-label="Permalink to "liteyuki.comm.socks_channel""></a></h1><p><strong>说明</strong>: 基于socket的通道</p><h3 id="class-sockschannel" tabindex="-1"><em><strong>class</strong></em> <code>SocksChannel</code> <a class="header-anchor" href="#class-sockschannel" aria-label="Permalink to "***class*** \`SocksChannel\`""></a></h3><h4 id="def-init-self-name-str" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, name: str)</code> <a class="header-anchor" href="#def-init-self-name-str" aria-label="Permalink to "***def*** \`__init__(self, name: str)\`""></a></h4><p><strong>说明</strong>: 初始化通道</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道ID</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.BZiUP1E-.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),e={name:"dev/api/comm/socks_channel.md"},t=n(`<h1 id="liteyuki-comm-socks-channel" tabindex="-1">liteyuki.comm.socks_channel <a class="header-anchor" href="#liteyuki-comm-socks-channel" aria-label="Permalink to "liteyuki.comm.socks_channel""></a></h1><p><strong>说明</strong>: 基于socket的通道</p><h3 id="class-sockschannel" tabindex="-1"><em><strong>class</strong></em> <code>SocksChannel</code> <a class="header-anchor" href="#class-sockschannel" aria-label="Permalink to "***class*** \`SocksChannel\`""></a></h3><h4 id="def-init-self-name-str" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, name: str)</code> <a class="header-anchor" href="#def-init-self-name-str" aria-label="Permalink to "***def*** \`__init__(self, name: str)\`""></a></h4><p><strong>说明</strong>: 初始化通道</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道ID</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/socks_channel.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 初始化通道</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.C3o_UkTa.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),e={name:"dev/api/comm/socks_channel.md"},t=n("",20),l=[t];function h(p,k,o,d,c,r){return i(),a("div",null,l)}const y=s(e,[["render",h]]);export{u as __pageData,y as default};
|
||||
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.BZiUP1E-.js";const u=JSON.parse('{"title":"liteyuki.comm.socks_channel","description":"","frontmatter":{"title":"liteyuki.comm.socks_channel"},"headers":[],"relativePath":"dev/api/comm/socks_channel.md","filePath":"zh/dev/api/comm/socks_channel.md","lastUpdated":null}'),e={name:"dev/api/comm/socks_channel.md"},t=n("",20),l=[t];function h(p,k,o,d,c,r){return i(),a("div",null,l)}const y=s(e,[["render",h]]);export{u as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n(`<h1 id="liteyuki-comm-storage" tabindex="-1">liteyuki.comm.storage <a class="header-anchor" href="#liteyuki-comm-storage" aria-label="Permalink to "liteyuki.comm.storage""></a></h1><p><strong>说明</strong>: 共享内存模块。类似于redis,但是更加轻量级并且线程安全</p><h3 id="var-on-main-subscriber-receive-funcs" tabindex="-1">var <code>_on_main_subscriber_receive_funcs</code> <a class="header-anchor" href="#var-on-main-subscriber-receive-funcs" aria-label="Permalink to "var \`_on_main_subscriber_receive_funcs\`""></a></h3><ul><li><p><strong>说明</strong>: 主进程订阅者接收函数</p></li><li><p><strong>类型</strong>: <code>dict[str, list[ASYNC_ON_RECEIVE_FUNC]]</code></p></li><li><p><strong>默认值</strong>: <code>{}</code></p></li></ul><h3 id="var-on-sub-subscriber-receive-funcs" tabindex="-1">var <code>_on_sub_subscriber_receive_funcs</code> <a class="header-anchor" href="#var-on-sub-subscriber-receive-funcs" aria-label="Permalink to "var \`_on_sub_subscriber_receive_funcs\`""></a></h3><ul><li><p><strong>说明</strong>: 子进程订阅者接收函数</p></li><li><p><strong>类型</strong>: <code>dict[str, list[ASYNC_ON_RECEIVE_FUNC]]</code></p></li><li><p><strong>默认值</strong>: <code>{}</code></p></li></ul><h3 id="class-keyvaluestore" tabindex="-1"><em><strong>class</strong></em> <code>KeyValueStore</code> <a class="header-anchor" href="#class-keyvaluestore" aria-label="Permalink to "***class*** \`KeyValueStore\`""></a></h3><h4 id="def-init-self" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self)</code> <a class="header-anchor" href="#def-init-self" aria-label="Permalink to "***def*** \`__init__(self)\`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/storage.py#L35" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n(`<h1 id="liteyuki-comm-storage" tabindex="-1">liteyuki.comm.storage <a class="header-anchor" href="#liteyuki-comm-storage" aria-label="Permalink to "liteyuki.comm.storage""></a></h1><p><strong>说明</strong>: 共享内存模块。类似于redis,但是更加轻量级并且线程安全</p><h3 id="var-on-main-subscriber-receive-funcs" tabindex="-1">var <code>_on_main_subscriber_receive_funcs</code> <a class="header-anchor" href="#var-on-main-subscriber-receive-funcs" aria-label="Permalink to "var \`_on_main_subscriber_receive_funcs\`""></a></h3><ul><li><p><strong>说明</strong>: 主进程订阅者接收函数</p></li><li><p><strong>类型</strong>: <code>dict[str, list[ASYNC_ON_RECEIVE_FUNC]]</code></p></li><li><p><strong>默认值</strong>: <code>{}</code></p></li></ul><h3 id="var-on-sub-subscriber-receive-funcs" tabindex="-1">var <code>_on_sub_subscriber_receive_funcs</code> <a class="header-anchor" href="#var-on-sub-subscriber-receive-funcs" aria-label="Permalink to "var \`_on_sub_subscriber_receive_funcs\`""></a></h3><ul><li><p><strong>说明</strong>: 子进程订阅者接收函数</p></li><li><p><strong>类型</strong>: <code>dict[str, list[ASYNC_ON_RECEIVE_FUNC]]</code></p></li><li><p><strong>默认值</strong>: <code>{}</code></p></li></ul><h3 id="class-keyvaluestore" tabindex="-1"><em><strong>class</strong></em> <code>KeyValueStore</code> <a class="header-anchor" href="#class-keyvaluestore" aria-label="Permalink to "***class*** \`KeyValueStore\`""></a></h3><h4 id="def-init-self" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self)</code> <a class="header-anchor" href="#def-init-self" aria-label="Permalink to "***def*** \`__init__(self)\`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/comm/storage.py#L35" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">._store </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.active_chan </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Optional[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]]](</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'shared_memory-active'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.passive_chan </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Optional[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]]](</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'shared_memory-passive'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n("",71),l=[e];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{o as __pageData,c as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.comm.storage","description":"","frontmatter":{"title":"liteyuki.comm.storage"},"headers":[],"relativePath":"dev/api/comm/storage.md","filePath":"zh/dev/api/comm/storage.md","lastUpdated":null}'),t={name:"dev/api/comm/storage.md"},e=n("",71),l=[e];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{o as __pageData,c as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s('<h1 id="liteyuki-config" tabindex="-1">liteyuki.config <a class="header-anchor" href="#liteyuki-config" aria-label="Permalink to "liteyuki.config""></a></h1><p><strong>说明</strong>: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式</p><h3 id="def-flat-config-config-dict-str-any-dict-str-any" tabindex="-1"><em><strong>def</strong></em> <code>flat_config(config: dict[str, Any]) -> dict[str, Any]</code> <a class="header-anchor" href="#def-flat-config-config-dict-str-any-dict-str-any" aria-label="Permalink to "***def*** `flat_config(config: dict[str, Any]) -> dict[str, Any]`""></a></h3><p><strong>说明</strong>: 扁平化配置文件</p>',4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s(`<p><strong>参数</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><p><strong>返回</strong>: 扁平化后的配置文件,但也包含原有的键值对</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L24" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> flat_config</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(config: dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]) -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]:</span></span>
|
||||
import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s('<h1 id="liteyuki-config" tabindex="-1">liteyuki.config <a class="header-anchor" href="#liteyuki-config" aria-label="Permalink to "liteyuki.config""></a></h1><p><strong>说明</strong>: 该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式</p><h3 id="def-flat-config-config-dict-str-any-dict-str-any" tabindex="-1"><em><strong>def</strong></em> <code>flat_config(config: dict[str, Any]) -> dict[str, Any]</code> <a class="header-anchor" href="#def-flat-config-config-dict-str-any-dict-str-any" aria-label="Permalink to "***def*** `flat_config(config: dict[str, Any]) -> dict[str, Any]`""></a></h3><p><strong>说明</strong>: 扁平化配置文件</p>',4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s(`<p><strong>参数</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><p><strong>返回</strong>: 扁平化后的配置文件,但也包含原有的键值对</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L24" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> flat_config</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(config: dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]) -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 扁平化配置文件</span></span>
|
||||
<span class="line"></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s("",4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s("",22),e=[h,k,p];function r(d,g,E,o,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default};
|
||||
import{_ as i,c as a,o as n,a4 as s,j as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.config","description":"","frontmatter":{"title":"liteyuki.config"},"headers":[],"relativePath":"dev/api/config.md","filePath":"zh/dev/api/config.md","lastUpdated":null}'),l={name:"dev/api/config.md"},h=s("",4),k=t("p",{"a.b.c:":"",1:""},"{a:{b:{c:1}}} ->",-1),p=s("",22),e=[h,k,p];function r(d,g,E,o,y,F){return n(),a("div",null,e)}const u=i(l,[["render",r]]);export{f as __pageData,u as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default};
|
||||
import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default};
|
||||
import{_ as t,c as a,o,j as e,a as r}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/core.md","filePath":"zh/dev/api/core/core.md","lastUpdated":null}'),c={name:"dev/api/core/core.md"},i=e("h1",{id:"liteyuki-core",tabindex:"-1"},[r("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),s=[i];function l(d,n,p,_,u,h){return o(),a("div",null,s)}const k=t(c,[["render",l]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default};
|
||||
import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default};
|
||||
import{_ as t,c as a,o as i,j as e,a as o}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.core","description":"","frontmatter":{"title":"liteyuki.core","collapsed":true},"headers":[],"relativePath":"dev/api/core/index.md","filePath":"zh/dev/api/core/index.md","lastUpdated":null}'),r={name:"dev/api/core/index.md"},c=e("h1",{id:"liteyuki-core",tabindex:"-1"},[o("liteyuki.core "),e("a",{class:"header-anchor",href:"#liteyuki-core","aria-label":'Permalink to "liteyuki.core"'},"")],-1),d=[c];function s(n,l,p,_,u,h){return i(),a("div",null,d)}const k=t(r,[["render",s]]);export{f as __pageData,k as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},t=n(`<h1 id="liteyuki-core-manager" tabindex="-1">liteyuki.core.manager <a class="header-anchor" href="#liteyuki-core-manager" aria-label="Permalink to "liteyuki.core.manager""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : manager.py @Software: PyCharm</p><h3 id="class-channeldeliver" tabindex="-1"><em><strong>class</strong></em> <code>ChannelDeliver</code> <a class="header-anchor" href="#class-channeldeliver" aria-label="Permalink to "***class*** \`ChannelDeliver\`""></a></h3><h4 id="def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code> <a class="header-anchor" href="#def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" aria-label="Permalink to "***def*** \`__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])\`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/core/manager.py#L43" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">dict</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]], publish: Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]):</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},t=n(`<h1 id="liteyuki-core-manager" tabindex="-1">liteyuki.core.manager <a class="header-anchor" href="#liteyuki-core-manager" aria-label="Permalink to "liteyuki.core.manager""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/27 上午11:12 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : manager.py @Software: PyCharm</p><h3 id="class-channeldeliver" tabindex="-1"><em><strong>class</strong></em> <code>ChannelDeliver</code> <a class="header-anchor" href="#class-channeldeliver" aria-label="Permalink to "***class*** \`ChannelDeliver\`""></a></h3><h4 id="def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code> <a class="header-anchor" href="#def-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" aria-label="Permalink to "***def*** \`__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])\`""></a></h4><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/core/manager.py#L43" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">dict</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]], publish: Channel[tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.active </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> active</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.passive </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> passive</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.channel_deliver_active </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> channel_deliver_active</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},t=n("",31),l=[t];function h(p,k,r,d,E,g){return a(),i("div",null,l)}const c=s(e,[["render",h]]);export{o as __pageData,c as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.core.manager","description":"","frontmatter":{"title":"liteyuki.core.manager"},"headers":[],"relativePath":"dev/api/core/manager.md","filePath":"zh/dev/api/core/manager.md","lastUpdated":null}'),e={name:"dev/api/core/manager.md"},t=n("",31),l=[t];function h(p,k,r,d,E,g){return a(),i("div",null,l)}const c=s(e,[["render",h]]);export{o as __pageData,c as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default};
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default};
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/dev.md","filePath":"zh/dev/api/dev/dev.md","lastUpdated":null}'),s={name:"dev/api/dev/dev.md"},l=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),r=[l,o];function n(c,v,p,_,u,h){return i(),d("div",null,r)}const k=a(s,[["render",n]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default};
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default};
|
||||
import{_ as a,c as d,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"liteyuki.dev","description":"","frontmatter":{"title":"liteyuki.dev","collapsed":true},"headers":[],"relativePath":"dev/api/dev/index.md","filePath":"zh/dev/api/dev/index.md","lastUpdated":null}'),n={name:"dev/api/dev/index.md"},s=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[t("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 该模块用于存放一些开发工具")],-1),o=[s,l];function r(c,p,_,u,v,h){return i(),d("div",null,o)}const k=a(n,[["render",r]]);export{f as __pageData,k as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a(`<h1 id="liteyuki-dev-observer" tabindex="-1">liteyuki.dev.observer <a class="header-anchor" href="#liteyuki-dev-observer" aria-label="Permalink to "liteyuki.dev.observer""></a></h1><p><strong>说明</strong>: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置<code>dev_mode</code>为True</p><h3 id="var-callback-func" tabindex="-1">var <code>CALLBACK_FUNC</code> <a class="header-anchor" href="#var-callback-func" aria-label="Permalink to "var \`CALLBACK_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 位置1为FileSystemEvent</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[FileSystemEvent], None]</code></p></li></ul><h3 id="var-filter-func" tabindex="-1">var <code>FILTER_FUNC</code> <a class="header-anchor" href="#var-filter-func" aria-label="Permalink to "var \`FILTER_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 位置1为FileSystemEvent</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[FileSystemEvent], bool]</code></p></li></ul><h3 id="def-debounce-wait" tabindex="-1"><em><strong>def</strong></em> <code>debounce(wait)</code> <a class="header-anchor" href="#def-debounce-wait" aria-label="Permalink to "***def*** \`debounce(wait)\`""></a></h3><p><strong>说明</strong>: 防抖函数</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/dev/observer.py#L20" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> debounce</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(wait):</span></span>
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a(`<h1 id="liteyuki-dev-observer" tabindex="-1">liteyuki.dev.observer <a class="header-anchor" href="#liteyuki-dev-observer" aria-label="Permalink to "liteyuki.dev.observer""></a></h1><p><strong>说明</strong>: 此模块用于注册观察者函数,使用watchdog监控文件变化并重启bot 启用该模块需要在配置文件中设置<code>dev_mode</code>为True</p><h3 id="var-callback-func" tabindex="-1">var <code>CALLBACK_FUNC</code> <a class="header-anchor" href="#var-callback-func" aria-label="Permalink to "var \`CALLBACK_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 位置1为FileSystemEvent</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[FileSystemEvent], None]</code></p></li></ul><h3 id="var-filter-func" tabindex="-1">var <code>FILTER_FUNC</code> <a class="header-anchor" href="#var-filter-func" aria-label="Permalink to "var \`FILTER_FUNC\`""></a></h3><ul><li><p><strong>说明</strong>: 位置1为FileSystemEvent</p></li><li><p><strong>类型</strong>: <code>TypeAlias</code></p></li><li><p><strong>默认值</strong>: <code>Callable[[FileSystemEvent], bool]</code></p></li></ul><h3 id="def-debounce-wait" tabindex="-1"><em><strong>def</strong></em> <code>debounce(wait)</code> <a class="header-anchor" href="#def-debounce-wait" aria-label="Permalink to "***def*** \`debounce(wait)\`""></a></h3><p><strong>说明</strong>: 防抖函数</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/dev/observer.py#L20" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> debounce</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(wait):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 防抖函数</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a("",27),l=[t];function h(p,k,r,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default};
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.dev.observer","description":"","frontmatter":{"title":"liteyuki.dev.observer"},"headers":[],"relativePath":"dev/api/dev/observer.md","filePath":"zh/dev/api/dev/observer.md","lastUpdated":null}'),n={name:"dev/api/dev/observer.md"},t=a("",27),l=[t];function h(p,k,r,d,o,c){return e(),i("div",null,l)}const y=s(n,[["render",h]]);export{g as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=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}'),n={name:"dev/api/dev/plugin.md"},l=t(`<h1 id="liteyuki-dev-plugin" tabindex="-1">liteyuki.dev.plugin <a class="header-anchor" href="#liteyuki-dev-plugin" aria-label="Permalink to "liteyuki.dev.plugin""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : plugin.py @Software: PyCharm</p><h3 id="def-run-plugins-module-path-str-path" tabindex="-1"><em><strong>def</strong></em> <code>run_plugins(*module_path: str | Path)</code> <a class="header-anchor" href="#def-run-plugins-module-path-str-path" aria-label="Permalink to "***def*** \`run_plugins(*module_path: str | Path)\`""></a></h3><p><strong>说明</strong>: 运行插件,无需手动初始化bot</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/dev/plugin.py#L17" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> run_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">module_path: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Path):</span></span>
|
||||
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":"dev/api/dev/plugin.md","filePath":"zh/dev/api/dev/plugin.md","lastUpdated":null}'),n={name:"dev/api/dev/plugin.md"},l=t(`<h1 id="liteyuki-dev-plugin" tabindex="-1">liteyuki.dev.plugin <a class="header-anchor" href="#liteyuki-dev-plugin" aria-label="Permalink to "liteyuki.dev.plugin""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/18 上午5:04 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : plugin.py @Software: PyCharm</p><h3 id="def-run-plugins-module-path-str-path" tabindex="-1"><em><strong>def</strong></em> <code>run_plugins(*module_path: str | Path)</code> <a class="header-anchor" href="#def-run-plugins-module-path-str-path" aria-label="Permalink to "***def*** \`run_plugins(*module_path: str | Path)\`""></a></h3><p><strong>说明</strong>: 运行插件,无需手动初始化bot</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/dev/plugin.py#L17" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> run_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">module_path: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Path):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 运行插件,无需手动初始化bot</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const E=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}'),n={name:"dev/api/dev/plugin.md"},l=t("",8),e=[l];function p(h,k,d,r,o,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{E as __pageData,y as default};
|
||||
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":"dev/api/dev/plugin.md","filePath":"zh/dev/api/dev/plugin.md","lastUpdated":null}'),n={name:"dev/api/dev/plugin.md"},l=t("",8),e=[l];function p(h,k,d,r,o,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{E as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default};
|
||||
import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default};
|
||||
import{_ as i,c as a,o as n,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.exception","description":"","frontmatter":{"title":"liteyuki.exception"},"headers":[],"relativePath":"dev/api/exception.md","filePath":"zh/dev/api/exception.md","lastUpdated":null}'),o={name:"dev/api/exception.md"},c=e("h1",{id:"liteyuki-exception",tabindex:"-1"},[t("liteyuki.exception "),e("a",{class:"header-anchor",href:"#liteyuki-exception","aria-label":'Permalink to "liteyuki.exception"'},"")],-1),s=e("p",null,[e("strong",null,"说明"),t(": exception模块包含了liteyuki运行中的所有错误")],-1),l=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("em",null,[e("strong",null,"class")]),t(),e("code",null,"LiteyukiException(BaseException)"),t(),e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception","aria-label":'Permalink to "***class*** `LiteyukiException(BaseException)`"'},"")],-1),p=[c,s,l];function r(d,x,u,_,h,k){return n(),a("div",null,p)}const f=i(o,[["render",r]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i('<h1 id="liteyuki" tabindex="-1">liteyuki <a class="header-anchor" href="#liteyuki" aria-label="Permalink to "liteyuki""></a></h1><h3 id="var-version" tabindex="-1">var <code>__version__</code> <a class="header-anchor" href="#var-version" aria-label="Permalink to "var `__version__`""></a></h3><ul><li><p><strong>说明</strong>: 测试版本号</p></li><li><p><strong>默认值</strong>: <code>'6.3.10'</code></p></li></ul>',3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default};
|
||||
import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.BZiUP1E-.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i('<h1 id="liteyuki" tabindex="-1">liteyuki <a class="header-anchor" href="#liteyuki" aria-label="Permalink to "liteyuki""></a></h1><h3 id="var-version" tabindex="-1">var <code>__version__</code> <a class="header-anchor" href="#var-version" aria-label="Permalink to "var `__version__`""></a></h3><ul><li><p><strong>说明</strong>: 测试版本号</p></li><li><p><strong>默认值</strong>: <code>'6.3.10'</code></p></li></ul>',3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.C3o_UkTa.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i("",3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default};
|
||||
import{_ as e,c as t,o as a,a4 as i}from"./chunks/framework.BZiUP1E-.js";const v=JSON.parse('{"title":"liteyuki","description":"","frontmatter":{"title":"liteyuki","collapsed":true},"headers":[],"relativePath":"dev/api/index.md","filePath":"zh/dev/api/index.md","lastUpdated":null}'),o={name:"dev/api/index.md"},r=i("",3),n=[r];function l(s,_,d,c,p,u){return a(),t("div",null,n)}const m=e(o,[["render",l]]);export{v as __pageData,m as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h(`<h1 id="liteyuki-log" tabindex="-1">liteyuki.log <a class="header-anchor" href="#liteyuki-log" aria-label="Permalink to "liteyuki.log""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : log.py @Software: PyCharm</p><h3 id="def-get-format-level-str-str" tabindex="-1"><em><strong>def</strong></em> <code>get_format(level: str) -> str</code> <a class="header-anchor" href="#def-get-format-level-str-str" aria-label="Permalink to "***def*** \`get_format(level: str) -> str\`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/log.py#L34" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(level: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h(`<h1 id="liteyuki-log" tabindex="-1">liteyuki.log <a class="header-anchor" href="#liteyuki-log" aria-label="Permalink to "liteyuki.log""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/27 上午9:12 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : log.py @Software: PyCharm</p><h3 id="def-get-format-level-str-str" tabindex="-1"><em><strong>def</strong></em> <code>get_format(level: str) -> str</code> <a class="header-anchor" href="#def-get-format-level-str-str" aria-label="Permalink to "***def*** \`get_format(level: str) -> str\`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/log.py#L34" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(level: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> level </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'DEBUG'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> debug_format</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h("",8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default};
|
||||
import{_ as s,c as i,o as a,a4 as h}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.log","description":"","frontmatter":{"title":"liteyuki.log"},"headers":[],"relativePath":"dev/api/log.md","filePath":"zh/dev/api/log.md","lastUpdated":null}'),t={name:"dev/api/log.md"},k=h("",8),l=[k];function n(p,e,E,r,g,d){return a(),i("div",null,l)}const o=s(t,[["render",n]]);export{y as __pageData,o as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e(`<h1 id="liteyuki-message-event" tabindex="-1">liteyuki.message.event <a class="header-anchor" href="#liteyuki-message-event" aria-label="Permalink to "liteyuki.message.event""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : event.py @Software: PyCharm</p><h3 id="class-messageevent" tabindex="-1"><em><strong>class</strong></em> <code>MessageEvent</code> <a class="header-anchor" href="#class-messageevent" aria-label="Permalink to "***class*** \`MessageEvent\`""></a></h3><h4 id="def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)</code> <a class="header-anchor" href="#def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none" aria-label="Permalink to "***def*** \`__init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)\`""></a></h4><p><strong>说明</strong>: 轻雪抽象消息事件</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/event.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, bot_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, message: list[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, message_type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, raw_message: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, session_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, user_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, session_type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, receive_channel: Optional[Channel[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'MessageEvent'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, data: Optional[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e(`<h1 id="liteyuki-message-event" tabindex="-1">liteyuki.message.event <a class="header-anchor" href="#liteyuki-message-event" aria-label="Permalink to "liteyuki.message.event""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : event.py @Software: PyCharm</p><h3 id="class-messageevent" tabindex="-1"><em><strong>class</strong></em> <code>MessageEvent</code> <a class="header-anchor" href="#class-messageevent" aria-label="Permalink to "***class*** \`MessageEvent\`""></a></h3><h4 id="def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)</code> <a class="header-anchor" href="#def-init-self-bot-id-str-message-list-dict-str-any-str-message-type-str-raw-message-str-session-id-str-user-id-str-session-type-str-receive-channel-optional-channel-messageevent-none-data-optional-dict-str-any-none" aria-label="Permalink to "***def*** \`__init__(self, bot_id: str, message: list[dict[str, Any]] | str, message_type: str, raw_message: str, session_id: str, user_id: str, session_type: str, receive_channel: Optional[Channel[MessageEvent]] = None, data: Optional[dict[str, Any]] = None)\`""></a></h4><p><strong>说明</strong>: 轻雪抽象消息事件</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/event.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, bot_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, message: list[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, message_type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, raw_message: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, session_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, user_id: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, session_type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, receive_channel: Optional[Channel[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'MessageEvent'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, data: Optional[dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]]</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">None</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 轻雪抽象消息事件</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default};
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const o=JSON.parse('{"title":"liteyuki.message.event","description":"","frontmatter":{"title":"liteyuki.message.event"},"headers":[],"relativePath":"dev/api/message/event.md","filePath":"zh/dev/api/message/event.md","lastUpdated":null}'),n={name:"dev/api/message/event.md"},t=e("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(n,[["render",l]]);export{o as __pageData,F as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
||||
import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
||||
import{_ as a,c as s,o as i,j as e,a as t}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/index.md","filePath":"zh/dev/api/message/index.md","lastUpdated":null}'),o={name:"dev/api/message/index.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[t("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[t("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py.py @Software: PyCharm")],-1),d=[l,n,r];function m(c,u,p,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e(`<h1 id="liteyuki-message-matcher" tabindex="-1">liteyuki.message.matcher <a class="header-anchor" href="#liteyuki-message-matcher" aria-label="Permalink to "liteyuki.message.matcher""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : matcher.py @Software: PyCharm</p><h3 id="class-matcher" tabindex="-1"><em><strong>class</strong></em> <code>Matcher</code> <a class="header-anchor" href="#class-matcher" aria-label="Permalink to "***class*** \`Matcher\`""></a></h3><h4 id="def-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code> <a class="header-anchor" href="#def-init-self-rule-rule-priority-int-block-bool" aria-label="Permalink to "***def*** \`__init__(self, rule: Rule, priority: int, block: bool)\`""></a></h4><p><strong>说明</strong>: 匹配器</p><p><strong>参数</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/matcher.py#L21" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, rule: Rule, priority: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, block: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e(`<h1 id="liteyuki-message-matcher" tabindex="-1">liteyuki.message.matcher <a class="header-anchor" href="#liteyuki-message-matcher" aria-label="Permalink to "liteyuki.message.matcher""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:51 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : matcher.py @Software: PyCharm</p><h3 id="class-matcher" tabindex="-1"><em><strong>class</strong></em> <code>Matcher</code> <a class="header-anchor" href="#class-matcher" aria-label="Permalink to "***class*** \`Matcher\`""></a></h3><h4 id="def-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code> <a class="header-anchor" href="#def-init-self-rule-rule-priority-int-block-bool" aria-label="Permalink to "***def*** \`__init__(self, rule: Rule, priority: int, block: bool)\`""></a></h4><p><strong>说明</strong>: 匹配器</p><p><strong>参数</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/matcher.py#L21" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, rule: Rule, priority: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, block: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 匹配器</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e("",18),l=[t];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default};
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),n={name:"dev/api/message/matcher.md"},t=e("",18),l=[t];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const E=s(n,[["render",h]]);export{y as __pageData,E as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as t,o,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default};
|
||||
import{_ as s,c as t,o,j as e,a}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as s,c as t,o,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default};
|
||||
import{_ as s,c as t,o,j as e,a}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message","description":"","frontmatter":{"title":"liteyuki.message","collapsed":true},"headers":[],"relativePath":"dev/api/message/message.md","filePath":"zh/dev/api/message/message.md","lastUpdated":null}'),i={name:"dev/api/message/message.md"},l=e("h1",{id:"liteyuki-message",tabindex:"-1"},[a("liteyuki.message "),e("a",{class:"header-anchor",href:"#liteyuki-message","aria-label":'Permalink to "liteyuki.message"'},"")],-1),r=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[a("@Time : 2024/8/19 下午10:44 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : "),e("strong",null,"init"),a(".py.py @Software: PyCharm")],-1),m=[l,r,n];function d(c,u,p,_,g,h){return o(),t("div",null,m)}const f=s(i,[["render",d]]);export{y as __pageData,f as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e(`<h1 id="liteyuki-message-on" tabindex="-1">liteyuki.message.on <a class="header-anchor" href="#liteyuki-message-on" aria-label="Permalink to "liteyuki.message.on""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : on.py @Software: PyCharm</p><h3 id="def-add-matcher-matcher-matcher" tabindex="-1"><em><strong>def</strong></em> <code>add_matcher(matcher: Matcher)</code> <a class="header-anchor" href="#def-add-matcher-matcher-matcher" aria-label="Permalink to "***def*** \`add_matcher(matcher: Matcher)\`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/on.py#L41" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> add_matcher</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(matcher: Matcher):</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e(`<h1 id="liteyuki-message-on" tabindex="-1">liteyuki.message.on <a class="header-anchor" href="#liteyuki-message-on" aria-label="Permalink to "liteyuki.message.on""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/19 下午10:52 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : on.py @Software: PyCharm</p><h3 id="def-add-matcher-matcher-matcher" tabindex="-1"><em><strong>def</strong></em> <code>add_matcher(matcher: Matcher)</code> <a class="header-anchor" href="#def-add-matcher-matcher-matcher" aria-label="Permalink to "***def*** \`add_matcher(matcher: Matcher)\`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/message/on.py#L41" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> add_matcher</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(matcher: Matcher):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> i, m </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> enumerate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(_matcher_list):</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> m.priority </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> matcher.priority:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _matcher_list.insert(i, matcher)</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e("",9),l=[n];function h(k,r,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default};
|
||||
import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.message.on","description":"","frontmatter":{"title":"liteyuki.message.on"},"headers":[],"relativePath":"dev/api/message/on.md","filePath":"zh/dev/api/message/on.md","lastUpdated":null}'),t={name:"dev/api/message/on.md"},n=e("",9),l=[n];function h(k,r,p,o,d,y){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"dev/api/message/rule.md","filePath":"zh/dev/api/message/rule.md","lastUpdated":null}'),t={name:"dev/api/message/rule.md"},n=a("",20),l=[n];function h(r,p,k,d,o,g){return e(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default};
|
||||
import{_ as s,c as i,o as e,a4 as a}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message.rule","description":"","frontmatter":{"title":"liteyuki.message.rule"},"headers":[],"relativePath":"dev/api/message/rule.md","filePath":"zh/dev/api/message/rule.md","lastUpdated":null}'),t={name:"dev/api/message/rule.md"},n=a("",20),l=[n];function h(r,p,k,d,o,g){return e(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default};
|
||||
import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default};
|
||||
import{_ as t,c as a,o,j as e,a as s}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.message.session","description":"","frontmatter":{"title":"liteyuki.message.session"},"headers":[],"relativePath":"dev/api/message/session.md","filePath":"zh/dev/api/message/session.md","lastUpdated":null}'),i={name:"dev/api/message/session.md"},n=e("h1",{id:"liteyuki-message-session",tabindex:"-1"},[s("liteyuki.message.session "),e("a",{class:"header-anchor",href:"#liteyuki-message-session","aria-label":'Permalink to "liteyuki.message.session"'},"")],-1),l=e("p",null,[e("strong",null,"说明"),s(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),r=e("p",null,[s("@Time : 2024/8/19 下午10:47 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),s(" @File : session.py @Software: PyCharm")],-1),m=[n,l,r];function d(c,u,_,p,h,k){return o(),a("div",null,m)}const f=t(i,[["render",d]]);export{y as __pageData,f as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"dev/api/mkdoc.md","filePath":"zh/dev/api/mkdoc.md","lastUpdated":null}'),n={name:"dev/api/mkdoc.md"},h=t("",65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default};
|
||||
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.mkdoc","description":"","frontmatter":{"title":"liteyuki.mkdoc"},"headers":[],"relativePath":"dev/api/mkdoc.md","filePath":"zh/dev/api/mkdoc.md","lastUpdated":null}'),n={name:"dev/api/mkdoc.md"},h=t("",65),k=[h];function l(p,e,r,E,d,g){return a(),i("div",null,k)}const o=s(n,[["render",l]]);export{y as __pageData,o as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a(`<h1 id="liteyuki-plugin" tabindex="-1">liteyuki.plugin <a class="header-anchor" href="#liteyuki-plugin" aria-label="Permalink to "liteyuki.plugin""></a></h1><h3 id="def-get-loaded-plugins-dict-str-plugin" tabindex="-1"><em><strong>def</strong></em> <code>get_loaded_plugins() -> dict[str, Plugin]</code> <a class="header-anchor" href="#def-get-loaded-plugins-dict-str-plugin" aria-label="Permalink to "***def*** \`get_loaded_plugins() -> dict[str, Plugin]\`""></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/__init__.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_loaded_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Plugin]:</span></span>
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a(`<h1 id="liteyuki-plugin" tabindex="-1">liteyuki.plugin <a class="header-anchor" href="#liteyuki-plugin" aria-label="Permalink to "liteyuki.plugin""></a></h1><h3 id="def-get-loaded-plugins-dict-str-plugin" tabindex="-1"><em><strong>def</strong></em> <code>get_loaded_plugins() -> dict[str, Plugin]</code> <a class="header-anchor" href="#def-get-loaded-plugins-dict-str-plugin" aria-label="Permalink to "***def*** \`get_loaded_plugins() -> dict[str, Plugin]\`""></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/__init__.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_loaded_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Plugin]:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 获取已加载的插件</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a("",5),l=[n];function p(d,r,h,o,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default};
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/index.md","filePath":"zh/dev/api/plugin/index.md","lastUpdated":null}'),e={name:"dev/api/plugin/index.md"},n=a("",5),l=[n];function p(d,r,h,o,u,g){return t(),s("div",null,l)}const _=i(e,[["render",p]]);export{c as __pageData,_ as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a(`<h1 id="liteyuki-plugin-load" tabindex="-1">liteyuki.plugin.load <a class="header-anchor" href="#liteyuki-plugin-load" aria-label="Permalink to "liteyuki.plugin.load""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : load.py @Software: PyCharm</p><h3 id="def-load-plugin-module-path-str-path-optional-plugin" tabindex="-1"><em><strong>def</strong></em> <code>load_plugin(module_path: str | Path) -> Optional[Plugin]</code> <a class="header-anchor" href="#def-load-plugin-module-path-str-path-optional-plugin" aria-label="Permalink to "***def*** \`load_plugin(module_path: str | Path) -> Optional[Plugin]\`""></a></h3><p><strong>说明</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/load.py#L30" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> load_plugin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(module_path: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Path) -> Optional[Plugin]:</span></span>
|
||||
import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.BZiUP1E-.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a(`<h1 id="liteyuki-plugin-load" tabindex="-1">liteyuki.plugin.load <a class="header-anchor" href="#liteyuki-plugin-load" aria-label="Permalink to "liteyuki.plugin.load""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : load.py @Software: PyCharm</p><h3 id="def-load-plugin-module-path-str-path-optional-plugin" tabindex="-1"><em><strong>def</strong></em> <code>load_plugin(module_path: str | Path) -> Optional[Plugin]</code> <a class="header-anchor" href="#def-load-plugin-module-path-str-path-optional-plugin" aria-label="Permalink to "***def*** \`load_plugin(module_path: str | Path) -> Optional[Plugin]\`""></a></h3><p><strong>说明</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/load.py#L30" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> load_plugin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(module_path: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Path) -> Optional[Plugin]:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 参数:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.C3o_UkTa.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a("",17),r=i("strong",null,"返回",-1),g=a("",1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default};
|
||||
import{_ as h,D as l,c as t,j as i,a as s,I as k,w as p,a4 as a,o as e}from"./chunks/framework.BZiUP1E-.js";const B=JSON.parse('{"title":"liteyuki.plugin.load","description":"","frontmatter":{"title":"liteyuki.plugin.load"},"headers":[],"relativePath":"dev/api/plugin/load.md","filePath":"zh/dev/api/plugin/load.md","lastUpdated":null}'),E={name:"dev/api/plugin/load.md"},d=a("",17),r=i("strong",null,"返回",-1),g=a("",1);function y(F,o,u,_,C,c){const n=l("y");return e(),t("div",null,[d,i("p",null,[r,s(": str: 设置后的插件名称 "),k(n,null,{default:p(()=>[s("name")]),_:1})]),g])}const A=h(E,[["render",y]]);export{B as __pageData,A as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default};
|
||||
import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default};
|
||||
import{_ as t,c as i,o as n,j as e,a}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"liteyuki.plugin.manager","description":"","frontmatter":{"title":"liteyuki.plugin.manager"},"headers":[],"relativePath":"dev/api/plugin/manager.md","filePath":"zh/dev/api/plugin/manager.md","lastUpdated":null}'),r={name:"dev/api/plugin/manager.md"},l=e("h1",{id:"liteyuki-plugin-manager",tabindex:"-1"},[a("liteyuki.plugin.manager "),e("a",{class:"header-anchor",href:"#liteyuki-plugin-manager","aria-label":'Permalink to "liteyuki.plugin.manager"'},"")],-1),o=e("p",null,[e("strong",null,"说明"),a(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),s=e("p",null,[a("@Time : 2024/7/23 下午11:59 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),a(" @File : manager.py @Software: PyCharm")],-1),m=[l,o,s];function u(p,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",u]]);export{y as __pageData,f as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"dev/api/plugin/model.md","filePath":"zh/dev/api/plugin/model.md","lastUpdated":null}'),o={name:"dev/api/plugin/model.md"},s=r("",25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default};
|
||||
import{_ as a,c as t,o as e,a4 as r}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.plugin.model","description":"","frontmatter":{"title":"liteyuki.plugin.model"},"headers":[],"relativePath":"dev/api/plugin/model.md","filePath":"zh/dev/api/plugin/model.md","lastUpdated":null}'),o={name:"dev/api/plugin/model.md"},s=r("",25),i=[s];function l(n,d,h,c,u,m){return e(),t("div",null,i)}const k=a(o,[["render",l]]);export{g as __pageData,k as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a(`<h1 id="liteyuki-plugin" tabindex="-1">liteyuki.plugin <a class="header-anchor" href="#liteyuki-plugin" aria-label="Permalink to "liteyuki.plugin""></a></h1><h3 id="def-get-loaded-plugins-dict-str-plugin" tabindex="-1"><em><strong>def</strong></em> <code>get_loaded_plugins() -> dict[str, Plugin]</code> <a class="header-anchor" href="#def-get-loaded-plugins-dict-str-plugin" aria-label="Permalink to "***def*** \`get_loaded_plugins() -> dict[str, Plugin]\`""></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/__init__.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_loaded_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Plugin]:</span></span>
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a(`<h1 id="liteyuki-plugin" tabindex="-1">liteyuki.plugin <a class="header-anchor" href="#liteyuki-plugin" aria-label="Permalink to "liteyuki.plugin""></a></h1><h3 id="def-get-loaded-plugins-dict-str-plugin" tabindex="-1"><em><strong>def</strong></em> <code>get_loaded_plugins() -> dict[str, Plugin]</code> <a class="header-anchor" href="#def-get-loaded-plugins-dict-str-plugin" aria-label="Permalink to "***def*** \`get_loaded_plugins() -> dict[str, Plugin]\`""></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugin/__init__.py#L13" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_loaded_plugins</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> dict[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Plugin]:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 获取已加载的插件</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a("",5),l=[e];function p(d,r,h,u,o,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default};
|
||||
import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.plugin","description":"","frontmatter":{"title":"liteyuki.plugin","collapsed":true},"headers":[],"relativePath":"dev/api/plugin/plugin.md","filePath":"zh/dev/api/plugin/plugin.md","lastUpdated":null}'),n={name:"dev/api/plugin/plugin.md"},e=a("",5),l=[e];function p(d,r,h,u,o,g){return t(),s("div",null,l)}const _=i(n,[["render",p]]);export{c as __pageData,_ as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t('<h1 id="liteyuki-plugins-liteecho" tabindex="-1">liteyuki.plugins.liteecho <a class="header-anchor" href="#liteyuki-plugins-liteecho" aria-label="Permalink to "liteyuki.plugins.liteecho""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : liteecho.py @Software: PyCharm</p><p><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></p><h3 id="async-def-liteecho-event-messageevent" tabindex="-1"><em><strong>async def</strong></em> <code>liteecho(event: MessageEvent)</code> <a class="header-anchor" href="#async-def-liteecho-event-messageevent" aria-label="Permalink to "***async def*** `liteecho(event: MessageEvent)`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugins/liteecho.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_startswith</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteecho'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">is_su_rule)</span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;">.handle()</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> liteecho</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(event: MessageEvent):</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.reply(event.raw_message.strip()[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:].strip())</span></span></code></pre></div></details>',6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default};
|
||||
import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t('<h1 id="liteyuki-plugins-liteecho" tabindex="-1">liteyuki.plugins.liteecho <a class="header-anchor" href="#liteyuki-plugins-liteecho" aria-label="Permalink to "liteyuki.plugins.liteecho""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/22 下午12:31 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : liteecho.py @Software: PyCharm</p><p><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></p><h3 id="async-def-liteecho-event-messageevent" tabindex="-1"><em><strong>async def</strong></em> <code>liteecho(event: MessageEvent)</code> <a class="header-anchor" href="#async-def-liteecho-event-messageevent" aria-label="Permalink to "***async def*** `liteecho(event: MessageEvent)`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/plugins/liteecho.py#L18" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_startswith</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteecho'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">is_su_rule)</span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;">.handle()</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> liteecho</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(event: MessageEvent):</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.reply(event.raw_message.strip()[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:].strip())</span></span></code></pre></div></details>',6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t("",6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default};
|
||||
import{_ as e,c as i,o as s,a4 as t}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.plugins.liteecho","description":"","frontmatter":{"title":"liteyuki.plugins.liteecho"},"headers":[],"relativePath":"dev/api/plugins/liteecho.md","filePath":"zh/dev/api/plugins/liteecho.md","lastUpdated":null}'),a={name:"dev/api/plugins/liteecho.md"},l=t("",6),n=[l];function h(o,p,r,k,c,d){return s(),i("div",null,n)}const y=e(a,[["render",h]]);export{g as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l(`<h1 id="liteyuki-plugins-plugin-loader" tabindex="-1">liteyuki.plugins.plugin_loader <a class="header-anchor" href="#liteyuki-plugins-plugin-loader" aria-label="Permalink to "liteyuki.plugins.plugin_loader""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : <strong>init</strong>.py.py @Software: PyCharm</p><h3 id="def-default-plugins-loader" tabindex="-1"><em><strong>def</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#def-default-plugins-loader" aria-label="Permalink to "***def*** \`default_plugins_loader()\`""></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 vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> default_plugins_loader</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">():</span></span>
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l(`<h1 id="liteyuki-plugins-plugin-loader" tabindex="-1">liteyuki.plugins.plugin_loader <a class="header-anchor" href="#liteyuki-plugins-plugin-loader" aria-label="Permalink to "liteyuki.plugins.plugin_loader""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : <strong>init</strong>.py.py @Software: PyCharm</p><h3 id="def-default-plugins-loader" tabindex="-1"><em><strong>def</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#def-default-plugins-loader" aria-label="Permalink to "***def*** \`default_plugins_loader()\`""></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 vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> default_plugins_loader</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">():</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 默认插件加载器,应在初始化时调用</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l("",6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default};
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/index.md","filePath":"zh/dev/api/plugins/plugin_loader/index.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/index.md"},t=l("",6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l(`<h1 id="liteyuki-plugins-plugin-loader" tabindex="-1">liteyuki.plugins.plugin_loader <a class="header-anchor" href="#liteyuki-plugins-plugin-loader" aria-label="Permalink to "liteyuki.plugins.plugin_loader""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : <strong>init</strong>.py.py @Software: PyCharm</p><h3 id="def-default-plugins-loader" tabindex="-1"><em><strong>def</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#def-default-plugins-loader" aria-label="Permalink to "***def*** \`default_plugins_loader()\`""></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 vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> default_plugins_loader</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">():</span></span>
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l(`<h1 id="liteyuki-plugins-plugin-loader" tabindex="-1">liteyuki.plugins.plugin_loader <a class="header-anchor" href="#liteyuki-plugins-plugin-loader" aria-label="Permalink to "liteyuki.plugins.plugin_loader""></a></h1><p><strong>说明</strong>: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved</p><p>@Time : 2024/8/11 下午10:02 @Author : snowykami @Email : <a href="mailto:snowykami@outlook.com" target="_blank" rel="noreferrer">snowykami@outlook.com</a> @File : <strong>init</strong>.py.py @Software: PyCharm</p><h3 id="def-default-plugins-loader" tabindex="-1"><em><strong>def</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#def-default-plugins-loader" aria-label="Permalink to "***def*** \`default_plugins_loader()\`""></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 vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> default_plugins_loader</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">():</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 默认插件加载器,应在初始化时调用</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +1 @@
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.C3o_UkTa.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l("",6),e=[t];function p(r,o,h,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default};
|
||||
import{_ as i,c as s,o as a,a4 as l}from"./chunks/framework.BZiUP1E-.js";const _=JSON.parse('{"title":"liteyuki.plugins.plugin_loader","description":"","frontmatter":{"title":"liteyuki.plugins.plugin_loader","collapsed":true},"headers":[],"relativePath":"dev/api/plugins/plugin_loader/plugin_loader.md","filePath":"zh/dev/api/plugins/plugin_loader/plugin_loader.md","lastUpdated":null}'),n={name:"dev/api/plugins/plugin_loader/plugin_loader.md"},t=l("",6),e=[t];function p(r,o,h,d,k,u){return a(),s("div",null,e)}const y=i(n,[["render",p]]);export{_ as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n(`<h1 id="liteyuki-utils" tabindex="-1">liteyuki.utils <a class="header-anchor" href="#liteyuki-utils" aria-label="Permalink to "liteyuki.utils""></a></h1><p><strong>说明</strong>: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改</p><h3 id="def-is-coroutine-callable-call-callable-any-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_coroutine_callable(call: Callable[..., Any]) -> bool</code> <a class="header-anchor" href="#def-is-coroutine-callable-call-callable-any-bool" aria-label="Permalink to "***def*** \`is_coroutine_callable(call: Callable[..., Any]) -> bool\`""></a></h3><p><strong>说明</strong>: 判断是否为协程可调用对象</p><p><strong>参数</strong>:</p><blockquote><ul><li>call: 可调用对象</li></ul></blockquote><p><strong>返回</strong>: bool: 是否为协程可调用对象</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/utils.py#L17" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_coroutine_callable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(call: Callable[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n(`<h1 id="liteyuki-utils" tabindex="-1">liteyuki.utils <a class="header-anchor" href="#liteyuki-utils" aria-label="Permalink to "liteyuki.utils""></a></h1><p><strong>说明</strong>: 一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改</p><h3 id="def-is-coroutine-callable-call-callable-any-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_coroutine_callable(call: Callable[..., Any]) -> bool</code> <a class="header-anchor" href="#def-is-coroutine-callable-call-callable-any-bool" aria-label="Permalink to "***def*** \`is_coroutine_callable(call: Callable[..., Any]) -> bool\`""></a></h3><p><strong>说明</strong>: 判断是否为协程可调用对象</p><p><strong>参数</strong>:</p><blockquote><ul><li>call: 可调用对象</li></ul></blockquote><p><strong>返回</strong>: bool: 是否为协程可调用对象</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/utils.py#L17" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_coroutine_callable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(call: Callable[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Any]) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断是否为协程可调用对象</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n("",30),p=[l];function h(e,k,r,o,d,E){return a(),i("div",null,p)}const y=s(t,[["render",h]]);export{c as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const c=JSON.parse('{"title":"liteyuki.utils","description":"","frontmatter":{"title":"liteyuki.utils"},"headers":[],"relativePath":"dev/api/utils.md","filePath":"zh/dev/api/utils.md","lastUpdated":null}'),t={name:"dev/api/utils.md"},l=n("",30),p=[l];function h(e,k,r,o,d,E){return a(),i("div",null,p)}const y=s(t,[["render",h]]);export{c as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n(`<h1 id="通道通信" tabindex="-1"><strong>通道通信</strong> <a class="header-anchor" href="#通道通信" aria-label="Permalink to "**通道通信**""></a></h1><h3 id="简介" tabindex="-1">简介 <a class="header-anchor" href="#简介" aria-label="Permalink to "简介""></a></h3><p>轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信, 轻雪提供了一个通道<a href="./api/comm/channel.html#class-channel-generic-t"><code>Channel</code></a>用于跨进程通信, 你可以通过<a href="./api/comm/channel.html#class-channel-generic-t"><code>Channel</code></a>发送消息给其他进程,也可以监听其他进程的消息。</p><p>例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。</p><h3 id="示例" tabindex="-1">示例 <a class="header-anchor" href="#示例" aria-label="Permalink to "示例""></a></h3><p>通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由<code>chan.on_receive()</code>装饰回调函数实现,主动模式需调用<code>chan.receive()</code>实现</p><ul><li>创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为<code>{process_name}-active</code>和<code>{process_name}-passive</code>,</li><li>主进程中通过<code>get_channel</code>函数获取通道对象</li><li>子进程中导入单例<code>active_channel</code>及<code>passive_channel</code>即可</li></ul><blockquote><p>在轻雪插件中(主进程中)</p></blockquote><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> asyncio</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n(`<h1 id="通道通信" tabindex="-1"><strong>通道通信</strong> <a class="header-anchor" href="#通道通信" aria-label="Permalink to "**通道通信**""></a></h1><h3 id="简介" tabindex="-1">简介 <a class="header-anchor" href="#简介" aria-label="Permalink to "简介""></a></h3><p>轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信, 轻雪提供了一个通道<a href="./api/comm/channel.html#class-channel-generic-t"><code>Channel</code></a>用于跨进程通信, 你可以通过<a href="./api/comm/channel.html#class-channel-generic-t"><code>Channel</code></a>发送消息给其他进程,也可以监听其他进程的消息。</p><p>例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。</p><h3 id="示例" tabindex="-1">示例 <a class="header-anchor" href="#示例" aria-label="Permalink to "示例""></a></h3><p>通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由<code>chan.on_receive()</code>装饰回调函数实现,主动模式需调用<code>chan.receive()</code>实现</p><ul><li>创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为<code>{process_name}-active</code>和<code>{process_name}-passive</code>,</li><li>主进程中通过<code>get_channel</code>函数获取通道对象</li><li>子进程中导入单例<code>active_channel</code>及<code>passive_channel</code>即可</li></ul><blockquote><p>在轻雪插件中(主进程中)</p></blockquote><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> asyncio</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> liteyuki.comm </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_channel, Channel</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> liteyuki </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_bot</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n("",20),l=[h];function t(p,k,r,d,E,o){return a(),i("div",null,l)}const y=s(e,[["render",t]]);export{g as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"进程通信","description":"","frontmatter":{"title":"进程通信","order":4},"headers":[],"relativePath":"dev/comm.md","filePath":"zh/dev/comm.md","lastUpdated":1725102337000}'),e={name:"dev/comm.md"},h=n("",20),l=[h];function t(p,k,r,d,E,o){return a(),i("div",null,l)}const y=s(e,[["render",t]]);export{g as __pageData,y as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.C3o_UkTa.js";const p=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725107025000}'),l={name:"dev/guide.md"},r=o('<h1 id="开发指南" tabindex="-1">开发指南 <a class="header-anchor" href="#开发指南" aria-label="Permalink to "开发指南""></a></h1><h2 id="如何开发" tabindex="-1">如何开发 <a class="header-anchor" href="#如何开发" aria-label="Permalink to "如何开发""></a></h2><p>插件开发无需阅读本文档,请阅读<a href="./plugin.html">插件开发文档</a>和<a href="./api/">API 引用</a>。</p><p>如需往轻雪仓库提交代码,请阅读以下内容:</p><ol><li>首先<a href="https://github.com/LiteyukiStudio/LiteyukiBot/fork" target="_blank" rel="noreferrer">fork</a>一份轻雪仓库到你的个人/组织账户下。</li><li>在你的仓库中进行开发。</li><li>在你的仓库中创建一个新的分支,将你的代码提交到这个分支。</li><li>在你的仓库中创建一个Pull Request,将你的分支合并到轻雪仓库的<code>main</code>分支。</li></ol><p>参与开发默认你已经了解Python语言和轻雪框架的基本使用方法,如果是文档相关的开发,请确保你了解Markdown语法和基本前端知识。 出现冲突请与仓库维护者联系。</p><h3 id="建议" tabindex="-1">建议 <a class="header-anchor" href="#建议" aria-label="Permalink to "建议""></a></h3><ul><li>开发过程中可以使用<code>mypy</code>, <code>flake8</code>, <code>black</code>等工具进行代码检查和格式化。</li><li>启用开发者模式,可以在<code>config.yml</code>中设置<code>dev_mode: true</code>,这样可以在控制台看到更多的调试信息。</li></ul><h2 id="规范化" tabindex="-1">规范化 <a class="header-anchor" href="#规范化" aria-label="Permalink to "规范化""></a></h2><ul><li>代码请遵循<a href="https://pep8.org/" target="_blank" rel="noreferrer"><code>PEP8</code></a>和<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Python Style Guide</code></a></li><li>此外,提交到轻雪仓库的代码,请遵循以下规范: <ul><li>请确保代码是可运行的,没有危害的。</li><li>请确保代码的类型提示是正确的。</li><li>请确保注释风格为<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Docstring</code></a>或<a href="https://github.com/LiteyukiStudio/litedoc" target="_blank" rel="noreferrer"><code>Liteyuki Docstring</code></a>(推荐)以保证Litedoc能够正确解析并生成文档。</li><li>若有面向普通用户部分,请确保文档是完善的(每种语言都有对应的文档)。</li></ul></li><li>文档请遵循<a href="https://www.markdownguide.org/" target="_blank" rel="noreferrer"><code>Markdown</code></a>语法,并且支持vitepress相关内容: <ul><li>编辑文档时每个语言的文档都要修订。</li><li>请确保文档内的链接是正确的,不要出现无法访问的链接。</li><li>请确保<strong>用户文档</strong>是通俗易懂的,<strong>开发文档</strong>是详细的。</li></ul></li></ul><h2 id="最后" tabindex="-1">最后 <a class="header-anchor" href="#最后" aria-label="Permalink to "最后""></a></h2><ul><li>本项目是一个非盈利的开源项目,我们欢迎任何人参与开发,你的贡献将会使轻雪变得更好。</li></ul>',12),i=[r];function d(c,n,h,s,u,g){return t(),a("div",null,i)}const f=e(l,[["render",d]]);export{p as __pageData,f as default};
|
||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BZiUP1E-.js";const p=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725107025000}'),l={name:"dev/guide.md"},r=o('<h1 id="开发指南" tabindex="-1">开发指南 <a class="header-anchor" href="#开发指南" aria-label="Permalink to "开发指南""></a></h1><h2 id="如何开发" tabindex="-1">如何开发 <a class="header-anchor" href="#如何开发" aria-label="Permalink to "如何开发""></a></h2><p>插件开发无需阅读本文档,请阅读<a href="./plugin.html">插件开发文档</a>和<a href="./api/">API 引用</a>。</p><p>如需往轻雪仓库提交代码,请阅读以下内容:</p><ol><li>首先<a href="https://github.com/LiteyukiStudio/LiteyukiBot/fork" target="_blank" rel="noreferrer">fork</a>一份轻雪仓库到你的个人/组织账户下。</li><li>在你的仓库中进行开发。</li><li>在你的仓库中创建一个新的分支,将你的代码提交到这个分支。</li><li>在你的仓库中创建一个Pull Request,将你的分支合并到轻雪仓库的<code>main</code>分支。</li></ol><p>参与开发默认你已经了解Python语言和轻雪框架的基本使用方法,如果是文档相关的开发,请确保你了解Markdown语法和基本前端知识。 出现冲突请与仓库维护者联系。</p><h3 id="建议" tabindex="-1">建议 <a class="header-anchor" href="#建议" aria-label="Permalink to "建议""></a></h3><ul><li>开发过程中可以使用<code>mypy</code>, <code>flake8</code>, <code>black</code>等工具进行代码检查和格式化。</li><li>启用开发者模式,可以在<code>config.yml</code>中设置<code>dev_mode: true</code>,这样可以在控制台看到更多的调试信息。</li></ul><h2 id="规范化" tabindex="-1">规范化 <a class="header-anchor" href="#规范化" aria-label="Permalink to "规范化""></a></h2><ul><li>代码请遵循<a href="https://pep8.org/" target="_blank" rel="noreferrer"><code>PEP8</code></a>和<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Python Style Guide</code></a></li><li>此外,提交到轻雪仓库的代码,请遵循以下规范: <ul><li>请确保代码是可运行的,没有危害的。</li><li>请确保代码的类型提示是正确的。</li><li>请确保注释风格为<a href="https://google.github.io/styleguide/pyguide.html" target="_blank" rel="noreferrer"><code>Google Docstring</code></a>或<a href="https://github.com/LiteyukiStudio/litedoc" target="_blank" rel="noreferrer"><code>Liteyuki Docstring</code></a>(推荐)以保证Litedoc能够正确解析并生成文档。</li><li>若有面向普通用户部分,请确保文档是完善的(每种语言都有对应的文档)。</li></ul></li><li>文档请遵循<a href="https://www.markdownguide.org/" target="_blank" rel="noreferrer"><code>Markdown</code></a>语法,并且支持vitepress相关内容: <ul><li>编辑文档时每个语言的文档都要修订。</li><li>请确保文档内的链接是正确的,不要出现无法访问的链接。</li><li>请确保<strong>用户文档</strong>是通俗易懂的,<strong>开发文档</strong>是详细的。</li></ul></li></ul><h2 id="最后" tabindex="-1">最后 <a class="header-anchor" href="#最后" aria-label="Permalink to "最后""></a></h2><ul><li>本项目是一个非盈利的开源项目,我们欢迎任何人参与开发,你的贡献将会使轻雪变得更好。</li></ul>',12),i=[r];function d(c,n,h,s,u,g){return t(),a("div",null,i)}const f=e(l,[["render",d]]);export{p as __pageData,f as default};
|
@ -1 +1 @@
|
||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.C3o_UkTa.js";const p=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725107025000}'),l={name:"dev/guide.md"},r=o("",12),i=[r];function d(c,n,h,s,u,g){return t(),a("div",null,i)}const f=e(l,[["render",d]]);export{p as __pageData,f as default};
|
||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BZiUP1E-.js";const p=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725107025000}'),l={name:"dev/guide.md"},r=o("",12),i=[r];function d(c,n,h,s,u,g){return t(),a("div",null,i)}const f=e(l,[["render",d]]);export{p as __pageData,f as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n(`<h1 id="轻雪函数" tabindex="-1"><strong>轻雪函数</strong> <a class="header-anchor" href="#轻雪函数" aria-label="Permalink to "**轻雪函数**""></a></h1><p>轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.</p><h3 id="函数文件" tabindex="-1"><strong>函数文件</strong> <a class="header-anchor" href="#函数文件" aria-label="Permalink to "**函数文件**""></a></h3><p>函数文件放在资源包的<code>functions</code>目录下,文件名以<code>.mcfunction</code> <code>.lyfunction</code> <code>.lyf</code>结尾,例如<code>test.mcfunction</code>,文件内容为一系列的命令,每行一个命令,支持单行注释<code>#</code>(编辑时的语法高亮可采取<code>shell</code>格式),例如:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 在发信器输出"hello world"</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n(`<h1 id="轻雪函数" tabindex="-1"><strong>轻雪函数</strong> <a class="header-anchor" href="#轻雪函数" aria-label="Permalink to "**轻雪函数**""></a></h1><p>轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅.</p><h3 id="函数文件" tabindex="-1"><strong>函数文件</strong> <a class="header-anchor" href="#函数文件" aria-label="Permalink to "**函数文件**""></a></h3><p>函数文件放在资源包的<code>functions</code>目录下,文件名以<code>.mcfunction</code> <code>.lyfunction</code> <code>.lyf</code>结尾,例如<code>test.mcfunction</code>,文件内容为一系列的命令,每行一个命令,支持单行注释<code>#</code>(编辑时的语法高亮可采取<code>shell</code>格式),例如:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 在发信器输出"hello world"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cmd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> hello</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> world</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 如果你想同时输出多行内容可以尝试换行符(Python格式)</span></span>
|
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n("",19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default};
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const F=JSON.parse('{"title":"轻雪函数","description":"","frontmatter":{"title":"轻雪函数","order":2},"headers":[],"relativePath":"dev/lyfunc.md","filePath":"zh/dev/lyfunc.md","lastUpdated":1725101868000}'),t={name:"dev/lyfunc.md"},l=n("",19),e=[l];function h(p,k,d,r,o,c){return a(),i("div",null,e)}const y=s(t,[["render",h]]);export{F as __pageData,y as default};
|
@ -1,4 +1,4 @@
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.C3o_UkTa.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"dev/plugin.md","filePath":"zh/dev/plugin.md","lastUpdated":1725101868000}'),t={name:"dev/plugin.md"},h=n(`<h1 id="简介" tabindex="-1">简介 <a class="header-anchor" href="#简介" aria-label="Permalink to "简介""></a></h1><p>轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能</p><h2 id="开始" tabindex="-1">开始 <a class="header-anchor" href="#开始" aria-label="Permalink to "开始""></a></h2><h3 id="创建插件" tabindex="-1">创建插件 <a class="header-anchor" href="#创建插件" aria-label="Permalink to "创建插件""></a></h3><p>一个<code>.py</code>文件或一个包含<code>__init__.py</code>的文件夹即可被识别为插件</p><p>首先创建一个文件夹,例如<code>watchdog_plugin</code>,并在其中创建一个<code>__init__.py</code>文件,即可创建一个插件</p><p><code>__init__.py</code></p><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> liteyuki.plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PluginMetadata, PluginType</span></span>
|
||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=JSON.parse('{"title":"轻雪插件开发","description":"","frontmatter":{"title":"轻雪插件开发","order":3},"headers":[],"relativePath":"dev/plugin.md","filePath":"zh/dev/plugin.md","lastUpdated":1725101868000}'),t={name:"dev/plugin.md"},h=n(`<h1 id="简介" tabindex="-1">简介 <a class="header-anchor" href="#简介" aria-label="Permalink to "简介""></a></h1><p>轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能</p><h2 id="开始" tabindex="-1">开始 <a class="header-anchor" href="#开始" aria-label="Permalink to "开始""></a></h2><h3 id="创建插件" tabindex="-1">创建插件 <a class="header-anchor" href="#创建插件" aria-label="Permalink to "创建插件""></a></h3><p>一个<code>.py</code>文件或一个包含<code>__init__.py</code>的文件夹即可被识别为插件</p><p>首先创建一个文件夹,例如<code>watchdog_plugin</code>,并在其中创建一个<code>__init__.py</code>文件,即可创建一个插件</p><p><code>__init__.py</code></p><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> liteyuki.plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PluginMetadata, PluginType</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .watch_dog </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 导入逻辑部分</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 定义插件元数据</span></span>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user