mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-15 01:34:38 +08:00
Deploying to docs from @ LiteyukiStudio/LiteyukiBot@ee1ae5a071 🚀
This commit is contained in:
parent
61eb268b77
commit
ccec2d8b98
@ -1 +1 @@
|
|||||||
import{t as p}from"./chunks/theme.Dlc49NT4.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};
|
import{t as p}from"./chunks/theme.Cnz9J3TU.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.DyxDXkmC.js
Normal file
1
assets/chunks/@localSearchIndexen.DyxDXkmC.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/chunks/@localSearchIndexroot.COTrUuor.js
Normal file
1
assets/chunks/@localSearchIndexroot.COTrUuor.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.BZiUP1E-.js";const g=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="func-init-self-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#func-init-self-none" aria-label="Permalink to "***func*** \`__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 g=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>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="func-init-self-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#func-init-self-none" aria-label="Permalink to "***func*** \`__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>
|
<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>
|
File diff suppressed because one or more lines are too long
1
assets/dev_api_comm_comm.md.CKtWuZKo.js
Normal file
1
assets/dev_api_comm_comm.md.CKtWuZKo.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o,j as e,a as c}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"},[c("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,"该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage",-1),n=[i,s];function l(r,d,_,p,h,u){return o(),a("div",null,n)}const v=t(m,[["render",l]]);export{k as __pageData,v as default};
|
1
assets/dev_api_comm_comm.md.CKtWuZKo.lean.js
Normal file
1
assets/dev_api_comm_comm.md.CKtWuZKo.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o,j as e,a as c}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"},[c("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,"该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage",-1),n=[i,s];function l(r,d,_,p,h,u){return o(),a("div",null,n)}const v=t(m,[["render",l]]);export{k as __pageData,v as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_comm_event.md.BHlPNcei.js
Normal file
1
assets/dev_api_comm_event.md.BHlPNcei.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as a,c as s,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>本模块用于轻雪主进程和子进程之间的通信的事件类</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="func-init-self-name-str-data-dict-str-any" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, name: str, data: dict[str, Any])</code> <a class="header-anchor" href="#func-init-self-name-str-data-dict-str-any" aria-label="Permalink to "***func*** `__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,p,o,c,k){return t(),s("div",null,l)}const y=a(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.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(r,d,o,p,c,k){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
import{_ as a,c as s,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,p,o,c,k){return t(),s("div",null,l)}const y=a(e,[["render",h]]);export{_ as __pageData,y as default};
|
@ -1 +0,0 @@
|
|||||||
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="func-init-self-name-str-data-dict-str-any" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, name: str, data: dict[str, Any])</code> <a class="header-anchor" href="#func-init-self-name-str-data-dict-str-any" aria-label="Permalink to "***func*** `__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(r,d,o,p,c,k){return t(),a("div",null,l)}const y=s(e,[["render",h]]);export{_ as __pageData,y as default};
|
|
1
assets/dev_api_comm_index.md.Cai8ylFQ.js
Normal file
1
assets/dev_api_comm_index.md.Cai8ylFQ.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o,j as e,a as i}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}'),c={name:"dev/api/comm/index.md"},n=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[i("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,"该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage",-1),l=[n,s];function r(d,m,_,p,h,u){return o(),a("div",null,l)}const x=t(c,[["render",r]]);export{k as __pageData,x as default};
|
1
assets/dev_api_comm_index.md.Cai8ylFQ.lean.js
Normal file
1
assets/dev_api_comm_index.md.Cai8ylFQ.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o,j as e,a as i}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}'),c={name:"dev/api/comm/index.md"},n=e("h1",{id:"liteyuki-comm",tabindex:"-1"},[i("liteyuki.comm "),e("a",{class:"header-anchor",href:"#liteyuki-comm","aria-label":'Permalink to "liteyuki.comm"'},"")],-1),s=e("p",null,"该模块用于轻雪主进程和Nonebot子进程之间的通信 依赖关系 event -> _ storage -> channel_ rpc -> channel_, storage",-1),l=[n,s];function r(d,m,_,p,h,u){return o(),a("div",null,l)}const x=t(c,[["render",r]]);export{k as __pageData,x as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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}'),n={name:"dev/api/comm/rpc.md"},e=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="func-init-self-on-calling-on-calling-func-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</code> <a class="header-anchor" href="#func-init-self-on-calling-on-calling-func-none" aria-label="Permalink to "***func*** `__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="func-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><em><strong>func</strong></em> <code>call(self, args: tuple, kwargs: dict) -> Any</code> <a class="header-anchor" href="#func-call-self-args-tuple-kwargs-dict-any" aria-label="Permalink to "***func*** `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=[e];function p(h,c,r,o,k,d){return a(),i("div",null,l)}const m=s(n,[["render",p]]);export{u as __pageData,m as default};
|
|
1
assets/dev_api_comm_rpc.md.CnYyjCyB.js
Normal file
1
assets/dev_api_comm_rpc.md.CnYyjCyB.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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}'),n={name:"dev/api/comm/rpc.md"},e=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>本模块用于实现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="func-init-self-on-calling-on-calling-func-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</code> <a class="header-anchor" href="#func-init-self-on-calling-on-calling-func-none" aria-label="Permalink to "***func*** `__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="func-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><em><strong>func</strong></em> <code>call(self, args: tuple, kwargs: dict) -> Any</code> <a class="header-anchor" href="#func-call-self-args-tuple-kwargs-dict-any" aria-label="Permalink to "***func*** `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=[e];function p(h,c,r,o,k,d){return a(),i("div",null,l)}const m=s(n,[["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.BZiUP1E-.js";const g=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="func-init-self-name-str" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, name: str)</code> <a class="header-anchor" href="#func-init-self-name-str" aria-label="Permalink to "***func*** \`__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 g=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>基于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="func-init-self-name-str" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, name: str)</code> <a class="header-anchor" href="#func-init-self-name-str" aria-label="Permalink to "***func*** \`__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;"> 初始化通道</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>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const c=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="func-init-self" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self)</code> <a class="header-anchor" href="#func-init-self" aria-label="Permalink to "***func*** \`__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 c=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>共享内存模块。类似于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="func-init-self" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self)</code> <a class="header-anchor" href="#func-init-self" aria-label="Permalink to "***func*** \`__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;">._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;">.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>
|
<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,4 +1,4 @@
|
|||||||
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="func-flat-config-config-dict-str-any-dict-str-any" tabindex="-1"><em><strong>func</strong></em> <code>flat_config(config: dict[str, Any]) -> dict[str, Any]</code> <a class="header-anchor" href="#func-flat-config-config-dict-str-any-dict-str-any" aria-label="Permalink to "***func*** `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>该模块用于常用配置文件的加载 多配置文件编写原则: 1.尽量不要冲突: 一个键不要多次出现 2.分工明确: 每个配置文件给一个或一类服务提供配置 3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式</p><h3 id="func-flat-config-config-dict-str-any-dict-str-any" tabindex="-1"><em><strong>func</strong></em> <code>flat_config(config: dict[str, Any]) -> dict[str, Any]</code> <a class="header-anchor" href="#func-flat-config-config-dict-str-any-dict-str-any" aria-label="Permalink to "***func*** `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 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>
|
<span class="line"></span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y=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="func-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>func</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="#func-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 "***func*** \`__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 y=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>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="func-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>func</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="#func-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 "***func*** \`__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;">.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;">.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>
|
<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
assets/dev_api_dev_dev.md.CsStlrzv.js
Normal file
1
assets/dev_api_dev_dev.md.CsStlrzv.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o as d,j as e,a as i}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"},o=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[i("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,"该模块用于存放一些开发工具",-1),r=[o,l];function n(c,v,p,_,u,h){return d(),a("div",null,r)}const k=t(s,[["render",n]]);export{f as __pageData,k as default};
|
1
assets/dev_api_dev_dev.md.CsStlrzv.lean.js
Normal file
1
assets/dev_api_dev_dev.md.CsStlrzv.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o as d,j as e,a as i}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"},o=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[i("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),l=e("p",null,"该模块用于存放一些开发工具",-1),r=[o,l];function n(c,v,p,_,u,h){return d(),a("div",null,r)}const k=t(s,[["render",n]]);export{f as __pageData,k as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_dev_index.md.C_WS5r8B.js
Normal file
1
assets/dev_api_dev_index.md.C_WS5r8B.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o as d,j as e,a as i}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}'),s={name:"dev/api/dev/index.md"},n=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[i("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,"该模块用于存放一些开发工具",-1),l=[n,o];function r(c,p,_,u,v,h){return d(),a("div",null,l)}const k=t(s,[["render",r]]);export{f as __pageData,k as default};
|
1
assets/dev_api_dev_index.md.C_WS5r8B.lean.js
Normal file
1
assets/dev_api_dev_index.md.C_WS5r8B.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,c as a,o as d,j as e,a as i}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}'),s={name:"dev/api/dev/index.md"},n=e("h1",{id:"liteyuki-dev",tabindex:"-1"},[i("liteyuki.dev "),e("a",{class:"header-anchor",href:"#liteyuki-dev","aria-label":'Permalink to "liteyuki.dev"'},"")],-1),o=e("p",null,"该模块用于存放一些开发工具",-1),l=[n,o];function r(c,p,_,u,v,h){return d(),a("div",null,l)}const k=t(s,[["render",r]]);export{f as __pageData,k as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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 a,a4 as e}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=e(`<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="func-debounce-wait" tabindex="-1"><em><strong>func</strong></em> <code>debounce(wait)</code> <a class="header-anchor" href="#func-debounce-wait" aria-label="Permalink to "***func*** \`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 a,a4 as e}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=e(`<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>此模块用于注册观察者函数,使用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="func-debounce-wait" tabindex="-1"><em><strong>func</strong></em> <code>debounce(wait)</code> <a class="header-anchor" href="#func-debounce-wait" aria-label="Permalink to "***func*** \`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>
|
<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,4 +1,4 @@
|
|||||||
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="func-run-plugins-module-path-str-path" tabindex="-1"><em><strong>func</strong></em> <code>run_plugins(*module_path: str | Path)</code> <a class="header-anchor" href="#func-run-plugins-module-path-str-path" aria-label="Permalink to "***func*** \`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>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="func-run-plugins-module-path-str-path" tabindex="-1"><em><strong>func</strong></em> <code>run_plugins(*module_path: str | Path)</code> <a class="header-anchor" href="#func-run-plugins-module-path-str-path" aria-label="Permalink to "***func*** \`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;"> """</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;"> 运行插件,无需手动初始化bot</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_exception.md.D9MrkWuH.js
Normal file
1
assets/dev_api_exception.md.D9MrkWuH.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as i,c as a,o,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}'),n={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,"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 o(),a("div",null,p)}const f=i(n,[["render",r]]);export{y as __pageData,f as default};
|
1
assets/dev_api_exception.md.D9MrkWuH.lean.js
Normal file
1
assets/dev_api_exception.md.D9MrkWuH.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as i,c as a,o,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}'),n={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,"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 o(),a("div",null,p)}const f=i(n,[["render",r]]);export{y as __pageData,f as default};
|
@ -1,4 +1,4 @@
|
|||||||
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="func-get-format-level-str-str" tabindex="-1"><em><strong>func</strong></em> <code>get_format(level: str) -> str</code> <a class="header-anchor" href="#func-get-format-level-str-str" aria-label="Permalink to "***func*** \`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>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="func-get-format-level-str-str" tabindex="-1"><em><strong>func</strong></em> <code>get_format(level: str) -> str</code> <a class="header-anchor" href="#func-get-format-level-str-str" aria-label="Permalink to "***func*** \`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;"> 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;"> 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>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}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}'),e={name:"dev/api/message/event.md"},t=n(`<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="func-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>func</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="#func-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 "***func*** \`__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 n}from"./chunks/framework.BZiUP1E-.js";const F=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}'),e={name:"dev/api/message/event.md"},t=n(`<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>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="func-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>func</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="#func-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 "***func*** \`__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;"> 轻雪抽象消息事件</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>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
||||||
@ -33,4 +33,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const o
|
|||||||
<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:#24292E;--shiki-dark:#E1E4E8;"> reply_event </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> MessageEvent(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">message_type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_type, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">message</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">message, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">raw_message</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">''</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">data</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'message'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: message}, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">bot_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.bot_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">user_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.user_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session_type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_type, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">receive_channel</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:#24292E;--shiki-dark:#E1E4E8;"> reply_event </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> MessageEvent(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">message_type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_type, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">message</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">message, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">raw_message</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">''</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">data</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'message'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: message}, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">bot_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.bot_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">user_id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.user_id, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session_type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.session_type, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">receive_channel</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:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.receive_channel:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.receive_channel:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.receive_channel.send(reply_event)</span></span></code></pre></div></details>`,12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(e,[["render",l]]);export{o as __pageData,F as default};
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.receive_channel.send(reply_event)</span></span></code></pre></div></details>`,12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const o=s(e,[["render",l]]);export{F as __pageData,o as default};
|
@ -1 +1 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}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}'),e={name:"dev/api/message/event.md"},t=n("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const F=s(e,[["render",l]]);export{o as __pageData,F as default};
|
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const F=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}'),e={name:"dev/api/message/event.md"},t=n("",12),h=[t];function l(k,p,r,d,E,g){return a(),i("div",null,h)}const o=s(e,[["render",l]]);export{F as __pageData,o as default};
|
1
assets/dev_api_message_index.md.CCVjJRZY.js
Normal file
1
assets/dev_api_message_index.md.CCVjJRZY.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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),r=e("p",null,"Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved",-1),n=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,r,n];function m(c,p,u,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
1
assets/dev_api_message_index.md.CCVjJRZY.lean.js
Normal file
1
assets/dev_api_message_index.md.CCVjJRZY.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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),r=e("p",null,"Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved",-1),n=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,r,n];function m(c,p,u,_,h,k){return i(),s("div",null,d)}const f=a(o,[["render",m]]);export{y as __pageData,f as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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 n}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}'),e={name:"dev/api/message/matcher.md"},t=n(`<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="func-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code> <a class="header-anchor" href="#func-init-self-rule-rule-priority-int-block-bool" aria-label="Permalink to "***func*** \`__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 n}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}'),e={name:"dev/api/message/matcher.md"},t=n(`<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>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="func-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code> <a class="header-anchor" href="#func-init-self-rule-rule-priority-int-block-bool" aria-label="Permalink to "***func*** \`__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;"> 匹配器</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>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
||||||
@ -32,4 +32,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const y
|
|||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> try</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> try</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> handler(event)</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> handler(event)</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> except</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> Exception</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> except</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> Exception</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> traceback.print_exc()</span></span></code></pre></div></details>`,18),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const E=s(e,[["render",h]]);export{y as __pageData,E as default};
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> traceback.print_exc()</span></span></code></pre></div></details>`,18),l=[t];function h(p,k,r,d,o,c){return a(),i("div",null,l)}const E=s(e,[["render",h]]);export{y as __pageData,E as default};
|
@ -1 +1 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}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}'),e={name:"dev/api/message/matcher.md"},t=n("",18),l=[t];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const E=s(e,[["render",h]]);export{y as __pageData,E 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.message.matcher","description":"","frontmatter":{"title":"liteyuki.message.matcher"},"headers":[],"relativePath":"dev/api/message/matcher.md","filePath":"zh/dev/api/message/matcher.md","lastUpdated":null}'),e={name:"dev/api/message/matcher.md"},t=n("",18),l=[t];function h(p,k,r,d,o,c){return a(),i("div",null,l)}const E=s(e,[["render",h]]);export{y as __pageData,E as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_message_message.md.D7Q_xymI.js
Normal file
1
assets/dev_api_message_message.md.D7Q_xymI.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as s,c as t,o as i,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}'),o={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,"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,p,u,_,g,h){return i(),t("div",null,m)}const f=s(o,[["render",d]]);export{y as __pageData,f as default};
|
1
assets/dev_api_message_message.md.D7Q_xymI.lean.js
Normal file
1
assets/dev_api_message_message.md.D7Q_xymI.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as s,c as t,o as i,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}'),o={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,"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,p,u,_,g,h){return i(),t("div",null,m)}const f=s(o,[["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.BZiUP1E-.js";const g=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="func-add-matcher-matcher-matcher" tabindex="-1"><em><strong>func</strong></em> <code>add_matcher(matcher: Matcher)</code> <a class="header-anchor" href="#func-add-matcher-matcher-matcher" aria-label="Permalink to "***func*** \`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 g=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>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="func-add-matcher-matcher-matcher" tabindex="-1"><em><strong>func</strong></em> <code>add_matcher(matcher: Matcher)</code> <a class="header-anchor" href="#func-add-matcher-matcher-matcher" aria-label="Permalink to "***func*** \`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;"> 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:#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>
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> _matcher_list.insert(i, matcher)</span></span>
|
File diff suppressed because one or more lines are too long
1
assets/dev_api_message_rule.md.Cq3-BWI-.js
Normal file
1
assets/dev_api_message_rule.md.Cq3-BWI-.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_message_session.md.DgJfdzXm.js
Normal file
1
assets/dev_api_message_session.md.DgJfdzXm.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as a,c as t,o as i,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}'),o={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),r=e("p",null,"Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved",-1),l=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,r,l];function d(c,_,p,u,h,k){return i(),t("div",null,m)}const f=a(o,[["render",d]]);export{y as __pageData,f as default};
|
1
assets/dev_api_message_session.md.DgJfdzXm.lean.js
Normal file
1
assets/dev_api_message_session.md.DgJfdzXm.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as a,c as t,o as i,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}'),o={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),r=e("p",null,"Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved",-1),l=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,r,l];function d(c,_,p,u,h,k){return i(),t("div",null,m)}const f=a(o,[["render",d]]);export{y as __pageData,f as default};
|
File diff suppressed because one or more lines are too long
@ -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.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="func-load-plugin-module-path-str-path-optional-plugin" tabindex="-1"><em><strong>func</strong></em> <code>load_plugin(module_path: str | Path) -> Optional[Plugin]</code> <a class="header-anchor" href="#func-load-plugin-module-path-str-path-optional-plugin" aria-label="Permalink to "***func*** \`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>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="func-load-plugin-module-path-str-path-optional-plugin" tabindex="-1"><em><strong>func</strong></em> <code>load_plugin(module_path: str | Path) -> Optional[Plugin]</code> <a class="header-anchor" href="#func-load-plugin-module-path-str-path-optional-plugin" aria-label="Permalink to "***func*** \`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 style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。</span></span>
|
||||||
<span class="line"></span>
|
<span class="line"></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
assets/dev_api_plugin_manager.md.CQM-LBSE.js
Normal file
1
assets/dev_api_plugin_manager.md.CQM-LBSE.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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"},o=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),l=e("p",null,"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=[o,l,s];function p(u,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",p]]);export{y as __pageData,f as default};
|
1
assets/dev_api_plugin_manager.md.CQM-LBSE.lean.js
Normal file
1
assets/dev_api_plugin_manager.md.CQM-LBSE.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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"},o=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),l=e("p",null,"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=[o,l,s];function p(u,d,c,g,_,h){return n(),i("div",null,m)}const f=t(r,[["render",p]]);export{y as __pageData,f as default};
|
@ -1 +0,0 @@
|
|||||||
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 +0,0 @@
|
|||||||
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
assets/dev_api_plugin_model.md.DGmRedWt.js
Normal file
1
assets/dev_api_plugin_model.md.DGmRedWt.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/dev_api_plugins_liteecho.md.DFOqVfpV.js
Normal file
1
assets/dev_api_plugins_liteecho.md.DFOqVfpV.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
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>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-func-liteecho-event-messageevent" tabindex="-1"><em><strong>async func</strong></em> <code>liteecho(event: MessageEvent)</code> <a class="header-anchor" href="#async-func-liteecho-event-messageevent" aria-label="Permalink to "***async func*** `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 +0,0 @@
|
|||||||
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-func-liteecho-event-messageevent" tabindex="-1"><em><strong>async func</strong></em> <code>liteecho(event: MessageEvent)</code> <a class="header-anchor" href="#async-func-liteecho-event-messageevent" aria-label="Permalink to "***async func*** `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,8 +1,8 @@
|
|||||||
import{_ as i,c as s,o as a,a4 as n}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}'),l={name:"dev/api/plugins/plugin_loader/index.md"},t=n(`<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="func-default-plugins-loader" tabindex="-1"><em><strong>func</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#func-default-plugins-loader" aria-label="Permalink to "***func*** \`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 n}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}'),l={name:"dev/api/plugins/plugin_loader/index.md"},t=n(`<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>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="func-default-plugins-loader" tabindex="-1"><em><strong>func</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#func-default-plugins-loader" aria-label="Permalink to "***func*** \`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>
|
<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>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, []):</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, []):</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugin(plugin)</span></span>
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugin(plugin)</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin_dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugin_dirs'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'src/liteyuki_plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]):</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin_dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugin_dirs'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'src/liteyuki_plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]):</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugins(plugin_dir)</span></span></code></pre></div></details>`,6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default};
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugins(plugin_dir)</span></span></code></pre></div></details>`,6),e=[t];function p(h,r,o,d,k,u){return a(),s("div",null,e)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default};
|
@ -1 +1 @@
|
|||||||
import{_ as i,c as s,o as a,a4 as n}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}'),l={name:"dev/api/plugins/plugin_loader/index.md"},t=n("",6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default};
|
import{_ as i,c as s,o as a,a4 as n}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}'),l={name:"dev/api/plugins/plugin_loader/index.md"},t=n("",6),e=[t];function p(h,r,o,d,k,u){return a(),s("div",null,e)}const c=i(l,[["render",p]]);export{_ as __pageData,c as default};
|
@ -1,8 +1,8 @@
|
|||||||
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="func-default-plugins-loader" tabindex="-1"><em><strong>func</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#func-default-plugins-loader" aria-label="Permalink to "***func*** \`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>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="func-default-plugins-loader" tabindex="-1"><em><strong>func</strong></em> <code>default_plugins_loader()</code> <a class="header-anchor" href="#func-default-plugins-loader" aria-label="Permalink to "***func*** \`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>
|
<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>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, []):</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, []):</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugin(plugin)</span></span>
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugin(plugin)</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin_dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugin_dirs'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'src/liteyuki_plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]):</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> plugin_dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> get_config(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'liteyuki.plugin_dirs'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'src/liteyuki_plugins'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]):</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugins(plugin_dir)</span></span></code></pre></div></details>`,6),e=[t];function p(r,o,h,d,k,u){return a(),s("div",null,e)}const c=i(n,[["render",p]]);export{_ as __pageData,c as default};
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> load_plugins(plugin_dir)</span></span></code></pre></div></details>`,6),e=[t];function p(r,h,o,d,k,u){return a(),s("div",null,e)}const c=i(n,[["render",p]]);export{_ as __pageData,c as default};
|
@ -1 +1 @@
|
|||||||
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 c=i(n,[["render",p]]);export{_ as __pageData,c 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,h,o,d,k,u){return a(),s("div",null,e)}const c=i(n,[["render",p]]);export{_ as __pageData,c as default};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=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="func-is-coroutine-callable-call-callable-any-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_coroutine_callable(call: Callable[..., Any]) -> bool</code> <a class="header-anchor" href="#func-is-coroutine-callable-call-callable-any-bool" aria-label="Permalink to "***func*** \`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 g=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>一些常用的工具类,部分来源于 nonebot 并遵循其许可进行修改</p><h3 id="func-is-coroutine-callable-call-callable-any-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_coroutine_callable(call: Callable[..., Any]) -> bool</code> <a class="header-anchor" href="#func-is-coroutine-callable-call-callable-any-bool" aria-label="Permalink to "***func*** \`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;"> 判断是否为协程可调用对象</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>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725150407000}'),l={name:"dev/guide.md"},i=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?tab=readme-ov-file#liteyuki-docstring" 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),r=[i];function d(c,n,h,s,u,g){return t(),a("div",null,r)}const p=e(l,[["render",d]]);export{f as __pageData,p as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BZiUP1E-.js";const f=JSON.parse('{"title":"开发指南","description":"","frontmatter":{"title":"开发指南","order":0},"headers":[],"relativePath":"dev/guide.md","filePath":"zh/dev/guide.md","lastUpdated":1725150407000}'),l={name:"dev/guide.md"},i=o("",12),r=[i];function d(c,n,h,s,u,g){return t(),a("div",null,r)}const p=e(l,[["render",d]]);export{f as __pageData,p as default};
|
|
1
assets/dev_guide.md.CxjP45NH.js
Normal file
1
assets/dev_guide.md.CxjP45NH.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/dev_guide.md.CxjP45NH.lean.js
Normal file
1
assets/dev_guide.md.CxjP45NH.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as o,o as i,a4 as l}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":1725158126000}'),t={name:"dev/guide.md"},d=l("",16),a=[d];function r(c,u,s,n,h,g){return i(),o("div",null,a)}const k=e(t,[["render",r]]);export{p as __pageData,k as default};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BZiUP1E-.js";const g=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"en/dev/api/bot/lifespan.md","filePath":"en/dev/api/bot/lifespan.md","lastUpdated":1725101868000}'),t={name:"en/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>Description</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>Description</strong>: 同步生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 异步生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 同步进程生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 异步进程生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 进程函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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="func-init-self-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#func-init-self-none" aria-label="Permalink to "***func*** \`__init__(self) -> None\`""></a></h4><p><strong>Description</strong>: 轻雪生命周期管理,启动、停止、重启</p><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/lifespan.py#L27" target="_blank">View on 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 g=JSON.parse('{"title":"liteyuki.bot.lifespan","description":"","frontmatter":{"title":"liteyuki.bot.lifespan"},"headers":[],"relativePath":"en/dev/api/bot/lifespan.md","filePath":"en/dev/api/bot/lifespan.md","lastUpdated":1725101868000}'),t={name:"en/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>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>Description</strong>: 同步生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 异步生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 同步进程生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 异步进程生命周期函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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>Description</strong>: 进程函数</p></li><li><p><strong>Type</strong>: <code>TypeAlias</code></p></li><li><p><strong>Default</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="func-init-self-none" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self) -> None</code> <a class="header-anchor" href="#func-init-self-none" aria-label="Permalink to "***func*** \`__init__(self) -> None\`""></a></h4><p><strong>Description</strong>: 轻雪生命周期管理,启动、停止、重启</p><details><summary><b>Source code</b> or <a href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/bot/lifespan.py#L27" target="_blank">View on 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>
|
<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>
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user