Deploying to gh-pages from @ LiteyukiStudio/LiteyukiBot@7c0b0df6ed 🚀

This commit is contained in:
远野千束 2024-08-29 05:53:08 +00:00
parent ed2ff81fdf
commit 1cdce61663
303 changed files with 7671 additions and 8785 deletions

File diff suppressed because one or more lines are too long

270
api/bot/index.html Normal file

File diff suppressed because one or more lines are too long

167
api/bot/lifespan.html Normal file

File diff suppressed because one or more lines are too long

251
api/comm/channel.html Normal file

File diff suppressed because one or more lines are too long

43
api/comm/event.html Normal file

File diff suppressed because one or more lines are too long

40
api/comm/index.html Normal file

File diff suppressed because one or more lines are too long

47
api/comm/rpc.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

197
api/comm/storage.html Normal file

File diff suppressed because one or more lines are too long

123
api/config.html Normal file

File diff suppressed because one or more lines are too long

40
api/core/index.html Normal file

File diff suppressed because one or more lines are too long

140
api/core/manager.html Normal file

File diff suppressed because one or more lines are too long

40
api/dev/index.html Normal file

File diff suppressed because one or more lines are too long

90
api/dev/observer.html Normal file

File diff suppressed because one or more lines are too long

52
api/dev/plugin.html Normal file

File diff suppressed because one or more lines are too long

40
api/exception.html Normal file

File diff suppressed because one or more lines are too long

40
api/index.html Normal file

File diff suppressed because one or more lines are too long

59
api/log.html Normal file

File diff suppressed because one or more lines are too long

77
api/message/event.html Normal file

File diff suppressed because one or more lines are too long

40
api/message/index.html Normal file

File diff suppressed because one or more lines are too long

77
api/message/matcher.html Normal file

File diff suppressed because one or more lines are too long

57
api/message/on.html Normal file

File diff suppressed because one or more lines are too long

62
api/message/rule.html Normal file

File diff suppressed because one or more lines are too long

40
api/message/session.html Normal file

File diff suppressed because one or more lines are too long

206
api/mkdoc.html Normal file

File diff suppressed because one or more lines are too long

47
api/plugin/index.html Normal file

File diff suppressed because one or more lines are too long

125
api/plugin/load.html Normal file

File diff suppressed because one or more lines are too long

40
api/plugin/manager.html Normal file

File diff suppressed because one or more lines are too long

42
api/plugin/model.html Normal file

File diff suppressed because one or more lines are too long

40
api/plugins/index.html Normal file

File diff suppressed because one or more lines are too long

43
api/plugins/liteecho.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

114
api/utils.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as t,o as e,c as o,b as n}from"./app-Du8R6vOa.js";const a={},r=n("p",null,"404 Not Found",-1),s=[r];function c(p,i){return e(),o("div",null,s)}const d=t(a,[["render",c],["__file","404.html.vue"]]),m=JSON.parse('{"path":"/404.html","title":"","lang":"zh-CN","frontmatter":{"layout":"NotFound","description":"404 Not Found","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/404.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:description","content":"404 Not Found"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\",\\"description\\":\\"404 Not Found\\"}"]]},"headers":[],"git":{},"readingTime":{"minutes":0.01,"words":3},"filePathRelative":null,"autoDesc":true}');export{d as comp,m as data};
import{_ as t,o as e,c as o,a as n}from"./app-EhCe7g9m.js";const a={},r=n("p",null,"404 Not Found",-1),s=[r];function c(p,i){return e(),o("div",null,s)}const d=t(a,[["render",c],["__file","404.html.vue"]]),m=JSON.parse('{"path":"/404.html","title":"","lang":"zh-CN","frontmatter":{"layout":"NotFound","description":"404 Not Found","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/404.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:description","content":"404 Not Found"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\",\\"description\\":\\"404 Not Found\\"}"]]},"headers":[],"git":{},"readingTime":{"minutes":0.01,"words":3},"filePathRelative":null,"autoDesc":true}');export{d as comp,m as data};

View File

@ -1 +1 @@
import{_ as e,o as t,c as o,e as r}from"./app-Du8R6vOa.js";const a={},n=r("<ol><li>本项目遵循<code>MIT</code>协议,你可以自由使用,修改,分发,但是请保留原作者信息</li><li>你可以选择开启<code>auto_report</code>(默认开启),轻雪会收集以下内容 <ul><li>运行环境的设备信息CPU内存系统信息及Python信息</li><li>插件信息(不含插件数据)</li><li>部分异常信息,</li><li>会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把<code>auto_report</code>设定为<code>false</code></li></ul></li><li>本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性</li><li>使用此项目代表你已经同意以上协议</li></ol>",1),i=[n];function l(c,s){return t(),o("div",null,i)}const p=e(a,[["render",l],["__file","agreement.html.vue"]]),d=JSON.parse('{"path":"/en/usage/agreement.html","title":"User Agreement","lang":"en-US","frontmatter":{"title":"User Agreement","icon":"user-secret","order":3,"category":"usage","description":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/agreement.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/agreement.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"User Agreement"}],["meta",{"property":"og:description","content":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"User Agreement\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.74,"words":222},"filePathRelative":"en/usage/agreement.md","localizedDate":"August 16, 2024","autoDesc":true}');export{p as comp,d as data};
import{_ as e,o as t,c as o,d as r}from"./app-EhCe7g9m.js";const a={},n=r("<ol><li>本项目遵循<code>MIT</code>协议,你可以自由使用,修改,分发,但是请保留原作者信息</li><li>你可以选择开启<code>auto_report</code>(默认开启),轻雪会收集以下内容 <ul><li>运行环境的设备信息CPU内存系统信息及Python信息</li><li>插件信息(不含插件数据)</li><li>部分异常信息,</li><li>会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把<code>auto_report</code>设定为<code>false</code></li></ul></li><li>本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性</li><li>使用此项目代表你已经同意以上协议</li></ol>",1),i=[n];function l(c,s){return t(),o("div",null,i)}const p=e(a,[["render",l],["__file","agreement.html.vue"]]),d=JSON.parse('{"path":"/en/usage/agreement.html","title":"User Agreement","lang":"en-US","frontmatter":{"title":"User Agreement","icon":"user-secret","order":3,"category":"usage","description":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/agreement.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/agreement.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"User Agreement"}],["meta",{"property":"og:description","content":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"User Agreement\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.74,"words":222},"filePathRelative":"en/usage/agreement.md","localizedDate":"August 16, 2024","autoDesc":true}');export{p as comp,d as data};

View File

@ -1 +1 @@
import{_ as e,o as t,c as o,e as a}from"./app-Du8R6vOa.js";const r={},i=a("<ol><li>本项目遵循<code>MIT</code>协议,你可以自由使用,修改,分发,但是请保留原作者信息</li><li>你可以选择开启<code>auto_report</code>(默认开启),轻雪会收集以下内容 <ul><li>运行环境的设备信息CPU内存系统信息及Python信息</li><li>插件信息(不含插件数据)</li><li>部分异常信息,</li><li>会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把<code>auto_report</code>设定为<code>false</code></li></ul></li><li>本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性</li><li>使用此项目代表你已经同意以上协议</li></ol>",1),n=[i];function l(c,m){return t(),o("div",null,n)}const s=e(r,[["render",l],["__file","agreement.html.vue"]]),d=JSON.parse('{"path":"/usage/agreement.html","title":"用户协议","lang":"zh-CN","frontmatter":{"title":"用户协议","icon":"user-secret","order":3,"category":"使用手册","description":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/agreement.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/agreement.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"用户协议"}],["meta",{"property":"og:description","content":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-07-20T16:40:55.000Z"}],["meta",{"property":"article:modified_time","content":"2024-07-20T16:40:55.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"用户协议\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-07-20T16:40:55.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1711621856000,"updatedTime":1721493655000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3},{"name":"Nanaloveyuki","email":"miaomiao_159@outlook.com","commits":1}]},"readingTime":{"minutes":0.76,"words":227},"filePathRelative":"usage/agreement.md","localizedDate":"2024年3月28日","autoDesc":true}');export{s as comp,d as data};
import{_ as e,o as t,c as o,d as a}from"./app-EhCe7g9m.js";const r={},i=a("<ol><li>本项目遵循<code>MIT</code>协议,你可以自由使用,修改,分发,但是请保留原作者信息</li><li>你可以选择开启<code>auto_report</code>(默认开启),轻雪会收集以下内容 <ul><li>运行环境的设备信息CPU内存系统信息及Python信息</li><li>插件信息(不含插件数据)</li><li>部分异常信息,</li><li>会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务器,若你不希望提供这些信息,可以在配置文件中把<code>auto_report</code>设定为<code>false</code></li></ul></li><li>本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性</li><li>使用此项目代表你已经同意以上协议</li></ol>",1),n=[i];function l(c,m){return t(),o("div",null,n)}const s=e(r,[["render",l],["__file","agreement.html.vue"]]),d=JSON.parse('{"path":"/usage/agreement.html","title":"用户协议","lang":"zh-CN","frontmatter":{"title":"用户协议","icon":"user-secret","order":3,"category":"使用手册","description":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/agreement.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/agreement.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"用户协议"}],["meta",{"property":"og:description","content":"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息 你可以选择开启auto_report(默认开启),轻雪会收集以下内容 运行环境的设备信息CPU内存系统信息及Python信息 插件信息(不含插件数据) 部分异常信息, 会话负载信息(不含隐私部分) 以上内容仅用于项目的优化,不包含任何隐私信息,且通过安全的方式传输到轻雪的服务..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-07-20T16:40:55.000Z"}],["meta",{"property":"article:modified_time","content":"2024-07-20T16:40:55.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"用户协议\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-07-20T16:40:55.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1711621856000,"updatedTime":1721493655000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3},{"name":"Nanaloveyuki","email":"miaomiao_159@outlook.com","commits":1}]},"readingTime":{"minutes":0.76,"words":227},"filePathRelative":"usage/agreement.md","localizedDate":"2024年3月28日","autoDesc":true}');export{s as comp,d as data};

File diff suppressed because one or more lines are too long

45
assets/app-EhCe7g9m.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

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

View File

@ -1,4 +1,4 @@
import{_ as e,r as t,o,c,b as n,d as s,a as l,e as p}from"./app-Du8R6vOa.js";const i={},r=p(`<p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><a class="header-anchor" href="#基础配置项"><span><strong>基础配置项</strong></span></a></h2><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">nonebot</span><span class="token punctuation">:</span>
import{_ as e,r as t,o,c,a as n,b as s,e as l,d as p}from"./app-EhCe7g9m.js";const i={},r=p(`<p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><a class="header-anchor" href="#基础配置项"><span><strong>基础配置项</strong></span></a></h2><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">nonebot</span><span class="token punctuation">:</span>
<span class="token comment"># Nonebot机器人的配置以前的最外层配置项仍可为Nonebot服务但是部分内容会被覆盖请尽快迁移</span>
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># &quot;&quot;alconna_use_command_startalconna</span>
<span class="token key atrule">host</span><span class="token punctuation">:</span> 127.0.0.1 <span class="token comment"># 0.0.0.0</span>

View File

@ -1,4 +1,4 @@
import{_ as e,r as t,o,c,b as n,d as s,a as l,e as p}from"./app-Du8R6vOa.js";const i={},u=p(`<p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><a class="header-anchor" href="#基础配置项"><span><strong>基础配置项</strong></span></a></h2><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">nonebot</span><span class="token punctuation">:</span>
import{_ as e,r as t,o,c,a as n,b as s,e as l,d as p}from"./app-EhCe7g9m.js";const i={},u=p(`<p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><a class="header-anchor" href="#基础配置项"><span><strong>基础配置项</strong></span></a></h2><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">nonebot</span><span class="token punctuation">:</span>
<span class="token comment"># Nonebot机器人的配置以前的最外层配置项仍可为Nonebot服务但是部分内容会被覆盖请尽快迁移</span>
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># &quot;&quot;alconna_use_command_startalconna</span>
<span class="token key atrule">host</span><span class="token punctuation">:</span> 127.0.0.1 <span class="token comment"># 0.0.0.0</span>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,47 +0,0 @@
import{_ as e,r as t,o,c as p,b as n,d as s,a as c,e as i}from"./app-Du8R6vOa.js";const l={},u=i(`<h2 id="通道通信" tabindex="-1"><a class="header-anchor" href="#通道通信"><span><strong>通道通信</strong></span></a></h2><h3 id="简介" tabindex="-1"><a class="header-anchor" href="#简介"><span>简介</span></a></h3><p>轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道<code>Channel</code>用于跨进程通信,你可以通过<code>Channel</code>发送消息给其他进程,也可以监听其他进程的消息。</p><p>例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。</p><h3 id="示例" tabindex="-1"><a class="header-anchor" href="#示例"><span>示例</span></a></h3><p>通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由<code>chan.on_receive()</code>装饰回调函数实现,主动模式需调用<code>chan.receive()</code>实现</p><ul><li>创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为<code>{process_name}-active</code>和<code>{process_name}-passive</code></li><li>主进程中通过<code>get_channel</code>函数获取通道对象</li><li>子进程中导入单例<code>active_channel</code>及<code>passive_channel</code>即可</li></ul><blockquote><p>在轻雪插件中(主进程中)</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">import</span> asyncio
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm <span class="token keyword">import</span> get_channel<span class="token punctuation">,</span> Channel
<span class="token keyword">from</span> liteyuki <span class="token keyword">import</span> get_bot
<span class="token comment"># get_channel函数获取通道对象参数为调用set_channel时的通道标识</span>
channel_passive <span class="token operator">=</span> get_channel<span class="token punctuation">(</span><span class="token string">&quot;nonebot-passive&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
channel_active <span class="token operator">=</span> get_channel<span class="token punctuation">(</span><span class="token string">&quot;nonebot-active&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
liteyuki_bot <span class="token operator">=</span> get_bot<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token comment"># 注册一个函数在轻雪启动后运行</span>
<span class="token decorator annotation punctuation">@liteyuki_bot<span class="token punctuation">.</span>on_after_start</span>
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">send_data</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>
channel_passive<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">&quot;I am liteyuki main process passive&quot;</span><span class="token punctuation">)</span>
channel_active<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">&quot;I am liteyuki main process active&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">await</span> asyncio<span class="token punctuation">.</span>sleep<span class="token punctuation">(</span><span class="token number">3</span><span class="token punctuation">)</span> <span class="token comment"># 3</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p>NoneBot</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> nonebot <span class="token keyword">import</span> get_driver
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm <span class="token keyword">import</span> active_channel<span class="token punctuation">,</span> passive_channel <span class="token comment"># </span>
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>log <span class="token keyword">import</span> logger
driver <span class="token operator">=</span> get_driver<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token comment"># 被动模式通过装饰器注册一个函数在接收到消息时运行每次接收到字符串数据时都会运行</span>
<span class="token decorator annotation punctuation">@passive_channel<span class="token punctuation">.</span>on_receive</span><span class="token punctuation">(</span>filter_func<span class="token operator">=</span><span class="token keyword">lambda</span> data<span class="token punctuation">:</span> <span class="token builtin">isinstance</span><span class="token punctuation">(</span>data<span class="token punctuation">,</span> <span class="token builtin">str</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">on_passive_receive</span><span class="token punctuation">(</span>data<span class="token punctuation">)</span><span class="token punctuation">:</span>
logger<span class="token punctuation">.</span>info<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;Passive receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span><span class="token punctuation">)</span>
<span class="token comment"># 注册一个函数在NoneBot启动后运行</span>
<span class="token decorator annotation punctuation">@driver<span class="token punctuation">.</span>on_startup</span>
<span class="token keyword">def</span> <span class="token function">on_startup</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>
data <span class="token operator">=</span> active_channel<span class="token punctuation">.</span>receive<span class="token punctuation">(</span><span class="token punctuation">)</span>
logger<span class="token punctuation">.</span>info<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;Active receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p></p></blockquote><div class="language-log line-numbers-mode" data-ext="log" data-title="log"><pre class="language-log"><code><span class="token date number">0000-00-00</span> <span class="token time number">00:00:00</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Passive receive:</span> I am liteyuki main process passive
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:00</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Active receive:</span> I am liteyuki main process active
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:03</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Passive receive:</span> I am liteyuki main process passive
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:03</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Active receive:</span> I am liteyuki main process active
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h2><h3 id="-1" tabindex="-1"><a class="header-anchor" href="#-1"><span></span></a></h3><ul><li>使<code>storage</code></li><li>线线线</li></ul><h3 id="-1" tabindex="-1"><a class="header-anchor" href="#-1"><span></span></a></h3><blockquote><p>使</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm<span class="token punctuation">.</span>storage <span class="token keyword">import</span> shared_memory
shared_memory<span class="token punctuation">.</span><span class="token builtin">set</span><span class="token punctuation">(</span><span class="token string">&quot;key&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;value&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
value <span class="token operator">=</span> shared_memory<span class="token punctuation">.</span>get<span class="token punctuation">(</span><span class="token string">&quot;key&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,19),r={href:"https://github.com/LiteyukiStudio/LiteyukiBot/blob/main/liteyuki/comm/storage.py",target:"_blank",rel:"noopener noreferrer"};function d(k,m){const a=t("ExternalLinkIcon");return o(),p("div",null,[u,n("p",null,[s(""),n("a",r,[s("liteyuki/comm/storage.py"),c(a)])])])}const h=e(l,[["render",d],["__file","dev_comm.html.vue"]]),b=JSON.parse('{"path":"/dev/dev_comm.html","title":"","lang":"zh-CN","frontmatter":{"title":"","icon":"exchange-alt","order":4,"category":"","description":" MainProcess ChannelChannel ...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_comm.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_comm.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":""}],["meta",{"property":"og:description","content":" MainProcess ChannelChannel ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-16T16:39:49.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T16:39:49.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T16:39:49.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]},{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"-1","link":"#-1","children":[]},{"level":3,"title":"","slug":"-1","link":"#-1","children":[]}]}],"git":{"createdTime":1723413012000,"updatedTime":1723826389000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4},{"name":"Snowykami","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":2.52,"words":757},"filePathRelative":"dev/dev_comm.md","localizedDate":"2024811","autoDesc":true}');export{h as comp,b as data};

View File

@ -1,47 +0,0 @@
import{_ as e,r as t,o,c as p,b as n,d as s,a as i,e as c}from"./app-Du8R6vOa.js";const l={},u=c(`<h2 id="通道通信" tabindex="-1"><a class="header-anchor" href="#通道通信"><span><strong>通道通信</strong></span></a></h2><h3 id="简介" tabindex="-1"><a class="header-anchor" href="#简介"><span>简介</span></a></h3><p>轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道<code>Channel</code>用于跨进程通信,你可以通过<code>Channel</code>发送消息给其他进程,也可以监听其他进程的消息。</p><p>例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息后重启对应子进程。</p><h3 id="示例" tabindex="-1"><a class="header-anchor" href="#示例"><span>示例</span></a></h3><p>通道是全双工的,有两种接收模式,但一个通道只能使用一种,即被动模式和主动模式,被动模式由<code>chan.on_receive()</code>装饰回调函数实现,主动模式需调用<code>chan.receive()</code>实现</p><ul><li>创建子进程的同时会初始化一个被动通道和一个主动通道,且通道标识为<code>{process_name}-active</code>和<code>{process_name}-passive</code></li><li>主进程中通过<code>get_channel</code>函数获取通道对象</li><li>子进程中导入单例<code>active_channel</code>及<code>passive_channel</code>即可</li></ul><blockquote><p>在轻雪插件中(主进程中)</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">import</span> asyncio
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm <span class="token keyword">import</span> get_channel<span class="token punctuation">,</span> Channel
<span class="token keyword">from</span> liteyuki <span class="token keyword">import</span> get_bot
<span class="token comment"># get_channel函数获取通道对象参数为调用set_channel时的通道标识</span>
channel_passive <span class="token operator">=</span> get_channel<span class="token punctuation">(</span><span class="token string">&quot;nonebot-passive&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
channel_active <span class="token operator">=</span> get_channel<span class="token punctuation">(</span><span class="token string">&quot;nonebot-active&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
liteyuki_bot <span class="token operator">=</span> get_bot<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token comment"># 注册一个函数在轻雪启动后运行</span>
<span class="token decorator annotation punctuation">@liteyuki_bot<span class="token punctuation">.</span>on_after_start</span>
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">send_data</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>
channel_passive<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">&quot;I am liteyuki main process passive&quot;</span><span class="token punctuation">)</span>
channel_active<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">&quot;I am liteyuki main process active&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">await</span> asyncio<span class="token punctuation">.</span>sleep<span class="token punctuation">(</span><span class="token number">3</span><span class="token punctuation">)</span> <span class="token comment"># 3</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p>NoneBot</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> nonebot <span class="token keyword">import</span> get_driver
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm <span class="token keyword">import</span> active_channel<span class="token punctuation">,</span> passive_channel <span class="token comment"># </span>
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>log <span class="token keyword">import</span> logger
driver <span class="token operator">=</span> get_driver<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token comment"># 被动模式通过装饰器注册一个函数在接收到消息时运行每次接收到字符串数据时都会运行</span>
<span class="token decorator annotation punctuation">@passive_channel<span class="token punctuation">.</span>on_receive</span><span class="token punctuation">(</span>filter_func<span class="token operator">=</span><span class="token keyword">lambda</span> data<span class="token punctuation">:</span> <span class="token builtin">isinstance</span><span class="token punctuation">(</span>data<span class="token punctuation">,</span> <span class="token builtin">str</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">on_passive_receive</span><span class="token punctuation">(</span>data<span class="token punctuation">)</span><span class="token punctuation">:</span>
logger<span class="token punctuation">.</span>info<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;Passive receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span><span class="token punctuation">)</span>
<span class="token comment"># 注册一个函数在NoneBot启动后运行</span>
<span class="token decorator annotation punctuation">@driver<span class="token punctuation">.</span>on_startup</span>
<span class="token keyword">def</span> <span class="token function">on_startup</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>
data <span class="token operator">=</span> active_channel<span class="token punctuation">.</span>receive<span class="token punctuation">(</span><span class="token punctuation">)</span>
logger<span class="token punctuation">.</span>info<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;Active receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><blockquote><p></p></blockquote><div class="language-log line-numbers-mode" data-ext="log" data-title="log"><pre class="language-log"><code><span class="token date number">0000-00-00</span> <span class="token time number">00:00:00</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Passive receive:</span> I am liteyuki main process passive
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:00</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Active receive:</span> I am liteyuki main process active
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:03</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Passive receive:</span> I am liteyuki main process passive
<span class="token date number">0000-00-00</span> <span class="token time number">00:00:03</span> <span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token property">Active receive:</span> I am liteyuki main process active
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h2><h3 id="-1" tabindex="-1"><a class="header-anchor" href="#-1"><span></span></a></h3><ul><li>使<code>storage</code></li><li>线线线</li></ul><h3 id="-1" tabindex="-1"><a class="header-anchor" href="#-1"><span></span></a></h3><blockquote><p>使</p></blockquote><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>comm<span class="token punctuation">.</span>storage <span class="token keyword">import</span> shared_memory
shared_memory<span class="token punctuation">.</span><span class="token builtin">set</span><span class="token punctuation">(</span><span class="token string">&quot;key&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;value&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
value <span class="token operator">=</span> shared_memory<span class="token punctuation">.</span>get<span class="token punctuation">(</span><span class="token string">&quot;key&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,19),r={href:"https://github.com/LiteyukiStudio/LiteyukiBot/blob/main/liteyuki/comm/storage.py",target:"_blank",rel:"noopener noreferrer"};function d(k,m){const a=t("ExternalLinkIcon");return o(),p("div",null,[u,n("ul",null,[n("li",null,[s(""),n("a",r,[s("liteyuki/comm/storage.py"),i(a)])])])])}const h=e(l,[["render",d],["__file","dev_comm.html.vue"]]),b=JSON.parse('{"path":"/en/dev/dev_comm.html","title":"Communication","lang":"en-US","frontmatter":{"title":"Communication","icon":"exchange-alt","order":4,"category":"development","description":" MainProcess ChannelChannel ...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_comm.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_comm.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Communication"}],["meta",{"property":"og:description","content":" MainProcess ChannelChannel ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Communication\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]},{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"-1","link":"#-1","children":[]},{"level":3,"title":"","slug":"-1","link":"#-1","children":[]}]}],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":2.51,"words":753},"filePathRelative":"en/dev/dev_comm.md","localizedDate":"August 16, 2024","autoDesc":true}');export{h as comp,b as data};

View File

@ -1,24 +0,0 @@
import{_ as t,r as o,o as i,c as l,b as n,d as e,a as s,e as c}from"./app-Du8R6vOa.js";const p={},r=c(`<h2 id="轻雪函数" tabindex="-1"><a class="header-anchor" href="#轻雪函数"><span><strong>轻雪函数</strong></span></a></h2><p>轻雪函数 Liteyuki Function 是轻雪的一个功能它允许你在轻雪中运行一些自定义的由数据驱动的命令类似于Minecraft的mcfunction属于资源包的一部分但需单独起篇幅.</p><h3 id="函数文件" tabindex="-1"><a class="header-anchor" href="#函数文件"><span><strong>函数文件</strong></span></a></h3><p>函数文件放在资源包的<code>functions</code>目录下,文件名以<code>.mcfunction</code> <code>.lyfunction</code> <code>.lyf</code>结尾,例如<code>test.mcfunction</code>,文件内容为一系列的命令,每行一个命令,支持单行注释<code>#</code>(编辑时的语法高亮可采取<code>shell</code>格式),例如:</p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># 在发信器输出&quot;hello world&quot;</span>
cmd <span class="token builtin class-name">echo</span> hello world
<span class="token comment"># 如果你想同时输出多行内容可以尝试换行符(Python格式)</span>
cmd <span class="token builtin class-name">echo</span> hello world<span class="token punctuation">\\</span>nLiteyuki bot
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p></p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>cmd <span class="token builtin class-name">echo</span> hello world <span class="token comment"># &quot;hello world&quot;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h3><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>var <span class="token operator">&lt;</span>var1<span class="token operator">=</span>value<span class="token operator"><span class="token file-descriptor important">1</span>&gt;</span> <span class="token punctuation">[</span>var2<span class="token operator">=</span>value2<span class="token punctuation">]</span> <span class="token punctuation">..</span>. <span class="token comment"># </span>
cmd <span class="token operator">&lt;</span>command<span class="token operator">&gt;</span> <span class="token comment"># </span>
api <span class="token operator">&lt;</span>api_name<span class="token operator">&gt;</span> <span class="token punctuation">[</span>var<span class="token operator">=</span>value<span class="token punctuation">..</span>.<span class="token punctuation">]</span> <span class="token comment"># Bot API</span>
<span class="token keyword">function</span> <span class="token operator">&lt;</span>func_name<span class="token operator">&gt;</span> <span class="token comment"># </span>
<span class="token function">sleep</span> <span class="token operator">&lt;</span>time<span class="token operator">&gt;</span> <span class="token comment"># s</span>
<span class="token function">nohup</span> <span class="token operator">&lt;</span>command<span class="token operator">&gt;</span> <span class="token comment"># 使task</span>
end <span class="token comment"># 结束函数关键字包括子task</span>
await <span class="token comment"># 等待所有异步任务结束若函数中启动了其他task需要在最后调用否则task对象会被销毁</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h4 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h4><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># </span>
<span class="token comment"># 使用 /function poke user_id=123456 执行</span>
<span class="token comment"># 每隔0.2s戳两次无限戳会触发最大递归深度限制</span>
<span class="token comment"># 若要戳20s后停止则需要删除await添加sleep 20和end</span>
api friend_poke <span class="token assign-left variable">user_id</span><span class="token operator">=</span>user_id
api friend_poke <span class="token assign-left variable">user_id</span><span class="token operator">=</span>user_id
<span class="token function">sleep</span> <span class="token number">0.2</span>
<span class="token function">nohup</span> <span class="token keyword">function</span> poke
await
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="api" tabindex="-1"><a class="header-anchor" href="#api"><span><strong>API</strong></span></a></h3><p>onebotv11apiAdapter api.</p>`,13),d={href:"https://283375.github.io/onebot_v11_vitepress/api/index.html",target:"_blank",rel:"noopener noreferrer"},u=n("h3",{id:"",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#"},[n("span",null,[n("strong",null,"")])])],-1),m=n("p",null,'LiteyukiBot, lyfunction"线".',-1),h=n("p",null,[n("code",null,"await"),e(" function")],-1),v=n("div",{class:"hint-container warning"},[n("p",{class:"hint-container-title"},""),n("p",null,"functiontaskawaittask")],-1),k={class:"hint-container tip"},f=n("p",{class:"hint-container-title"},"",-1),b={href:"https://github.com/LiteyukiStudio/lyfunctionTextmate",target:"_blank",rel:"noopener noreferrer"};function g(_,y){const a=o("ExternalLinkIcon");return i(),l("div",null,[r,n("p",null,[n("a",d,[e("Onebot v11 API"),s(a)])]),u,m,h,v,n("div",k,[f,n("p",null,[e("使VS Code"),n("a",b,[e("Liteyuki Function"),s(a)]),e("")])])])}const w=t(p,[["render",g],["__file","dev_lyfunc.html.vue"]]),L=JSON.parse('{"path":"/dev/dev_lyfunc.html","title":"","lang":"zh-CN","frontmatter":{"title":"","icon":"code","order":2,"category":"","description":" Liteyuki Function Minecraftmcfunction. functions.mcfunction .lyfunction .lyftest.mc...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_lyfunc.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_lyfunc.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":""}],["meta",{"property":"og:description","content":" Liteyuki Function Minecraftmcfunction. functions.mcfunction .lyfunction .lyftest.mc..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-11T21:26:36.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-11T21:26:36.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T21:26:36.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"API","slug":"api","link":"#api","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]}],"git":{"createdTime":1723411596000,"updatedTime":1723411596000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":1.89,"words":566},"filePathRelative":"dev/dev_lyfunc.md","localizedDate":"2024811","autoDesc":true}');export{w as comp,L as data};

View File

@ -1,24 +0,0 @@
import{_ as t,r as o,o as i,c as l,b as n,d as e,a as s,e as c}from"./app-Du8R6vOa.js";const p={},r=c(`<h2 id="轻雪函数" tabindex="-1"><a class="header-anchor" href="#轻雪函数"><span><strong>轻雪函数</strong></span></a></h2><p>轻雪函数 Liteyuki Function 是轻雪的一个功能它允许你在轻雪中运行一些自定义的由数据驱动的命令类似于Minecraft的mcfunction属于资源包的一部分但需单独起篇幅.</p><h3 id="函数文件" tabindex="-1"><a class="header-anchor" href="#函数文件"><span><strong>函数文件</strong></span></a></h3><p>函数文件放在资源包的<code>functions</code>目录下,文件名以<code>.mcfunction</code> <code>.lyfunction</code> <code>.lyf</code>结尾,例如<code>test.mcfunction</code>,文件内容为一系列的命令,每行一个命令,支持单行注释<code>#</code>(编辑时的语法高亮可采取<code>shell</code>格式),例如:</p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># 在发信器输出&quot;hello world&quot;</span>
cmd <span class="token builtin class-name">echo</span> hello world
<span class="token comment"># 如果你想同时输出多行内容可以尝试换行符(Python格式)</span>
cmd <span class="token builtin class-name">echo</span> hello world<span class="token punctuation">\\</span>nLiteyuki bot
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p></p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>cmd <span class="token builtin class-name">echo</span> hello world <span class="token comment"># &quot;hello world&quot;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h3><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>var <span class="token operator">&lt;</span>var1<span class="token operator">=</span>value<span class="token operator"><span class="token file-descriptor important">1</span>&gt;</span> <span class="token punctuation">[</span>var2<span class="token operator">=</span>value2<span class="token punctuation">]</span> <span class="token punctuation">..</span>. <span class="token comment"># </span>
cmd <span class="token operator">&lt;</span>command<span class="token operator">&gt;</span> <span class="token comment"># </span>
api <span class="token operator">&lt;</span>api_name<span class="token operator">&gt;</span> <span class="token punctuation">[</span>var<span class="token operator">=</span>value<span class="token punctuation">..</span>.<span class="token punctuation">]</span> <span class="token comment"># Bot API</span>
<span class="token keyword">function</span> <span class="token operator">&lt;</span>func_name<span class="token operator">&gt;</span> <span class="token comment"># </span>
<span class="token function">sleep</span> <span class="token operator">&lt;</span>time<span class="token operator">&gt;</span> <span class="token comment"># s</span>
<span class="token function">nohup</span> <span class="token operator">&lt;</span>command<span class="token operator">&gt;</span> <span class="token comment"># 使task</span>
end <span class="token comment"># 结束函数关键字包括子task</span>
await <span class="token comment"># 等待所有异步任务结束若函数中启动了其他task需要在最后调用否则task对象会被销毁</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h4 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h4><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># </span>
<span class="token comment"># 使用 /function poke user_id=123456 执行</span>
<span class="token comment"># 每隔0.2s戳两次无限戳会触发最大递归深度限制</span>
<span class="token comment"># 若要戳20s后停止则需要删除await添加sleep 20和end</span>
api friend_poke <span class="token assign-left variable">user_id</span><span class="token operator">=</span>user_id
api friend_poke <span class="token assign-left variable">user_id</span><span class="token operator">=</span>user_id
<span class="token function">sleep</span> <span class="token number">0.2</span>
<span class="token function">nohup</span> <span class="token keyword">function</span> poke
await
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="api" tabindex="-1"><a class="header-anchor" href="#api"><span><strong>API</strong></span></a></h3><p>onebotv11apiAdapter api.</p>`,13),d={href:"https://283375.github.io/onebot_v11_vitepress/api/index.html",target:"_blank",rel:"noopener noreferrer"},u=n("h3",{id:"",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#"},[n("span",null,[n("strong",null,"")])])],-1),m=n("p",null,'LiteyukiBot, lyfunction"线".',-1),h=n("p",null,[n("code",null,"await"),e(" function")],-1),v=n("div",{class:"hint-container warning"},[n("p",{class:"hint-container-title"},"Warning"),n("p",null,"functiontaskawaittask")],-1),k={class:"hint-container tip"},f=n("p",{class:"hint-container-title"},"Tips",-1),g={href:"https://github.com/LiteyukiStudio/lyfunctionTextmate",target:"_blank",rel:"noopener noreferrer"};function b(_,y){const a=o("ExternalLinkIcon");return i(),l("div",null,[r,n("p",null,[n("a",d,[e("Onebot v11 API"),s(a)])]),u,m,h,v,n("div",k,[f,n("p",null,[e("使VS Code"),n("a",g,[e("Liteyuki Function"),s(a)]),e("")])])])}const w=t(p,[["render",b],["__file","dev_lyfunc.html.vue"]]),L=JSON.parse('{"path":"/en/dev/dev_lyfunc.html","title":"Liteyuki Function","lang":"en-US","frontmatter":{"title":"Liteyuki Function","icon":"code","order":2,"category":"development","description":" Liteyuki Function Minecraftmcfunction. functions.mcfunction .lyfunction .lyftest.mc...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_lyfunc.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_lyfunc.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Liteyuki Function"}],["meta",{"property":"og:description","content":" Liteyuki Function Minecraftmcfunction. functions.mcfunction .lyfunction .lyftest.mc..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Liteyuki Function\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"API","slug":"api","link":"#api","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]}],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":1.88,"words":563},"filePathRelative":"en/dev/dev_lyfunc.md","localizedDate":"August 16, 2024","autoDesc":true}');export{w as comp,L as data};

View File

@ -1,35 +0,0 @@
import{_ as n,o as s,c as a,e}from"./app-Du8R6vOa.js";const t={},p=e(`<h2 id="简介" tabindex="-1"><a class="header-anchor" href="#简介"><span>简介</span></a></h2><p>轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能</p><h2 id="开始" tabindex="-1"><a class="header-anchor" href="#开始"><span>开始</span></a></h2><h3 id="创建插件" tabindex="-1"><a class="header-anchor" href="#创建插件"><span>创建插件</span></a></h3><p>一个<code>.py</code>文件或一个包含<code>__init__.py</code>的文件夹即可被识别为插件</p><p>首先创建一个文件夹,例如<code>watchdog_plugin</code>,并在其中创建一个<code>__init__.py</code>文件,即可创建一个插件</p><p><code>__init__.py</code></p><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>plugin <span class="token keyword">import</span> PluginMetadata<span class="token punctuation">,</span> PluginType
<span class="token keyword">from</span> <span class="token punctuation">.</span>watch_dog <span class="token keyword">import</span> <span class="token operator">*</span> <span class="token comment"># </span>
<span class="token comment"># 定义插件元数据</span>
__plugin_meta__ <span class="token operator">=</span> PluginMetadata<span class="token punctuation">(</span>
name<span class="token operator">=</span><span class="token string">&quot;NoneDog&quot;</span><span class="token punctuation">,</span> <span class="token comment"># </span>
version<span class="token operator">=</span><span class="token string">&quot;1.0.0&quot;</span><span class="token punctuation">,</span> <span class="token comment"># </span>
description<span class="token operator">=</span><span class="token string">&quot;A simple plugin for nonebot developer&quot;</span><span class="token punctuation">,</span> <span class="token comment"># </span>
<span class="token builtin">type</span><span class="token operator">=</span>PluginType<span class="token punctuation">.</span>SERVICE <span class="token comment"># </span>
<span class="token punctuation">)</span>
<span class="token comment"># 你的插件代码</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h3><p> NoneBot <code>watch_dog.py</code></p><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">import</span> os
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>dev <span class="token keyword">import</span> observer <span class="token comment"># </span>
<span class="token keyword">from</span> liteyuki <span class="token keyword">import</span> get_bot<span class="token punctuation">,</span> logger <span class="token comment"># Bot</span>
<span class="token keyword">from</span> watchdog<span class="token punctuation">.</span>events <span class="token keyword">import</span> FileSystemEvent <span class="token comment"># </span>
liteyuki <span class="token operator">=</span> get_bot<span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment"># Bot</span>
exclude_extensions <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token string">&quot;.pyc&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;.pyo&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
<span class="token comment"># 用observer的on_file_system_event装饰器监听文件系统事件</span>
<span class="token decorator annotation punctuation">@observer<span class="token punctuation">.</span>on_file_system_event</span><span class="token punctuation">(</span>
directories<span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">&quot;src/nonebot_plugins&quot;</span><span class="token punctuation">,</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
event_filter<span class="token operator">=</span><span class="token keyword">lambda</span> event<span class="token punctuation">:</span> <span class="token keyword">not</span> event<span class="token punctuation">.</span>src_path<span class="token punctuation">.</span>endswith<span class="token punctuation">(</span>exclude_extensions<span class="token punctuation">)</span> <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token string">&quot;__pycache__&quot;</span> <span class="token keyword">not</span> <span class="token keyword">in</span> event<span class="token punctuation">.</span>src_path<span class="token punctuation">)</span> <span class="token keyword">and</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>isfile<span class="token punctuation">(</span>event<span class="token punctuation">.</span>src_path<span class="token punctuation">)</span>
<span class="token punctuation">)</span>
<span class="token keyword">def</span> <span class="token function">restart_nonebot_process</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> FileSystemEvent<span class="token punctuation">)</span><span class="token punctuation">:</span>
logger<span class="token punctuation">.</span>debug<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;File </span><span class="token interpolation"><span class="token punctuation">{</span>event<span class="token punctuation">.</span>src_path<span class="token punctuation">}</span></span><span class="token string"> changed, reloading nonebot...&quot;</span></span><span class="token punctuation">)</span>
liteyuki<span class="token punctuation">.</span>restart_process<span class="token punctuation">(</span><span class="token string">&quot;nonebot&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h3><h4 id="1" tabindex="-1"><a class="header-anchor" href="#1"><span>1</span></a></h4><ul><li><code>liteyuki.plugins</code><code>watchdog_plugin</code></li></ul><h4 id="2" tabindex="-1"><a class="header-anchor" href="#2"><span>2</span></a></h4><ul><li>使</li><li><code>main.py</code></li></ul><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>dev<span class="token punctuation">.</span>plugin <span class="token keyword">import</span> run_plugins
run_plugins<span class="token punctuation">(</span><span class="token string">&quot;watchdog_plugin&quot;</span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><code>python main.py</code></p><p>src/nonebot_plugins<code>test.py</code>NoneBot</p>`,19),o=[p];function i(c,l){return s(),a("div",null,o)}const d=n(t,[["render",i],["__file","dev_lyplugin.html.vue"]]),r=JSON.parse('{"path":"/dev/dev_lyplugin.html","title":"","lang":"zh-CN","frontmatter":{"title":"","icon":"laptop-code","order":3,"category":"","description":" .py__init__.py watchdog_plugin__init__.py __init__.py ...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_lyplugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_lyplugin.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":""}],["meta",{"property":"og:description","content":" .py__init__.py watchdog_plugin__init__.py __init__.py ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-18T15:52:26.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-18T15:52:26.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-18T15:52:26.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[]},{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]}],"git":{"createdTime":1723411596000,"updatedTime":1723996346000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":1.68,"words":504},"filePathRelative":"dev/dev_lyplugin.md","localizedDate":"2024811","autoDesc":true}');export{d as comp,r as data};

View File

@ -1,30 +0,0 @@
import{_ as n,o as s,c as a,e}from"./app-Du8R6vOa.js";const t={},o=e(`<h2 id="简介" tabindex="-1"><a class="header-anchor" href="#简介"><span>简介</span></a></h2><p>轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能</p><h2 id="开始" tabindex="-1"><a class="header-anchor" href="#开始"><span>开始</span></a></h2><h3 id="创建插件" tabindex="-1"><a class="header-anchor" href="#创建插件"><span>创建插件</span></a></h3><p>在标准项目中位于liteyuki/plugins和src/liteyuki_plugins下的Python modules均会被当作插件加载你可自行添加配置文件以指定插件的加载路径 一个<code>.py</code>文件或一个包含<code>__init__.py</code>的文件夹即可被识别为插件 创建一个文件夹,例如<code>watchdog_plugin</code>,并在其中创建一个<code>__init__.py</code>文件,即可创建一个插件</p><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>plugin <span class="token keyword">import</span> PluginMetadata
<span class="token comment"># 定义插件元数据推荐填写</span>
__plugin_meta__ <span class="token operator">=</span> PluginMetadata<span class="token punctuation">(</span>
name<span class="token operator">=</span><span class="token string">&quot;NoneDog&quot;</span><span class="token punctuation">,</span> <span class="token comment"># </span>
version<span class="token operator">=</span><span class="token string">&quot;1.0.0&quot;</span><span class="token punctuation">,</span> <span class="token comment"># </span>
description<span class="token operator">=</span><span class="token string">&quot;A simple plugin for nonebot developer&quot;</span> <span class="token comment"># </span>
<span class="token punctuation">)</span>
<span class="token comment"># 你的插件代码</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h3><p> NoneBot</p><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">import</span> os
<span class="token keyword">from</span> liteyuki<span class="token punctuation">.</span>dev <span class="token keyword">import</span> observer <span class="token comment"># </span>
<span class="token keyword">from</span> liteyuki <span class="token keyword">import</span> get_bot<span class="token punctuation">,</span> logger <span class="token comment"># Bot</span>
<span class="token keyword">from</span> watchdog<span class="token punctuation">.</span>events <span class="token keyword">import</span> FileSystemEvent <span class="token comment"># </span>
liteyuki <span class="token operator">=</span> get_bot<span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment"># Bot</span>
exclude_extensions <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token string">&quot;.pyc&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;.pyo&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
<span class="token comment"># 用observer的on_file_system_event装饰器监听文件系统事件</span>
<span class="token decorator annotation punctuation">@observer<span class="token punctuation">.</span>on_file_system_event</span><span class="token punctuation">(</span>
directories<span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">&quot;src/nonebot_plugins&quot;</span><span class="token punctuation">,</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
event_filter<span class="token operator">=</span><span class="token keyword">lambda</span> event<span class="token punctuation">:</span> <span class="token keyword">not</span> event<span class="token punctuation">.</span>src_path<span class="token punctuation">.</span>endswith<span class="token punctuation">(</span>exclude_extensions<span class="token punctuation">)</span> <span class="token keyword">and</span> <span class="token punctuation">(</span><span class="token string">&quot;__pycache__&quot;</span> <span class="token keyword">not</span> <span class="token keyword">in</span> event<span class="token punctuation">.</span>src_path<span class="token punctuation">)</span> <span class="token keyword">and</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>isfile<span class="token punctuation">(</span>event<span class="token punctuation">.</span>src_path<span class="token punctuation">)</span>
<span class="token punctuation">)</span>
<span class="token keyword">def</span> <span class="token function">restart_nonebot_process</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> FileSystemEvent<span class="token punctuation">)</span><span class="token punctuation">:</span>
logger<span class="token punctuation">.</span>debug<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;File </span><span class="token interpolation"><span class="token punctuation">{</span>event<span class="token punctuation">.</span>src_path<span class="token punctuation">}</span></span><span class="token string"> changed, reloading nonebot...&quot;</span></span><span class="token punctuation">)</span>
liteyuki<span class="token punctuation">.</span>restart_process<span class="token punctuation">(</span><span class="token string">&quot;nonebot&quot;</span><span class="token punctuation">)</span> <span class="token comment"># </span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h3><p><code>liteyuki.plugins</code><code>watchdog_plugin</code>src/nonebot_plugins<code>test.py</code>NoneBot</p>`,11),p=[o];function i(l,c){return s(),a("div",null,p)}const r=n(t,[["render",i],["__file","dev_lyplugin.html.vue"]]),d=JSON.parse('{"path":"/en/dev/dev_lyplugin.html","title":"Liteyuki Plugin","lang":"en-US","frontmatter":{"title":"Liteyuki Plugin","icon":"laptop-code","order":3,"category":"development","description":" liteyuki/pluginssrc/liteyuki_pluginsPython modules .py__init__.py...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_lyplugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_lyplugin.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Liteyuki Plugin"}],["meta",{"property":"og:description","content":" liteyuki/pluginssrc/liteyuki_pluginsPython modules .py__init__.py..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Liteyuki Plugin\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[]},{"level":2,"title":"","slug":"","link":"#","children":[{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]},{"level":3,"title":"","slug":"","link":"#","children":[]}]}],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":1.53,"words":460},"filePathRelative":"en/dev/dev_lyplugin.md","localizedDate":"August 16, 2024","autoDesc":true}');export{r as comp,d as data};

View File

@ -1,15 +0,0 @@
import{_ as a,r as s,o as l,c as o,b as e,a as c,w as i,d as t,e as d}from"./app-Du8R6vOa.js";const r={},p=e("h2",{id:"简介",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#简介"},[e("span",null,"简介")])],-1),u=e("p",null,"资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码",-1),m=e("li",null,[t("资源包的制作很简单,如果你接触过"),e("code",null,"Minecraft"),t("的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。")],-1),h=e("li",null,[t("部分内容制作需要一点点前端基础,例如"),e("code",null,"html"),t(""),e("code",null,"css")],-1),v=e("li",null,[t("轻雪原版资源包请查看"),e("code",null,"LiteyukiBot/liteyuki/resources"),t(",可以在此基础上进行修改")],-1),_=e("li",null,"欢迎各位投稿资源包到轻雪资源商店",-1),k=d(`<p>请注意主题包中的html渲染使用Js来规定数据的渲染位置请确保您所编写的html代码能被Bot解析否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码以避免出现无法预料的问题。</p><hr><h2 id="加载资源包" tabindex="-1"><a class="header-anchor" href="#加载资源包"><span>加载资源包</span></a></h2><ul><li>资源包通常是以<code>.zip</code>格式压缩的,只需要将其解压到根目录<code>resources</code>目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的</li></ul><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>main.py
resources
resource_pack_1
metadata.yml
templates
<span class="token punctuation">..</span>.
resource_pack_2
metadata.yml
<span class="token punctuation">..</span>.
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>,<code>metadata.yml</code></li><li><code>metadata.yml</code></li></ul><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span>
<span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">&quot;1.0.0&quot;</span>
<span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span>
<span class="token comment"># 你可以自定义一些信息,但请保证以上三个字段</span>
<span class="token punctuation">...</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>A<code>index.html</code>B<code>index.html</code>BA<code>index.html</code></li><li>A<code>templates/index.html</code>B<code>templates/style.css</code>A<code>index.html</code><code>./style.css</code>Bcss</li></ul><div class="hint-container tip"><p class="hint-container-title">Tips</p><p></p></div>`,9);function y(g,b){const n=s("RouteLink");return l(),o("div",null,[p,u,e("ul",null,[e("li",null,[c(n,{to:"/store/"},{default:i(()=>[t("/")]),_:1}),t("")]),m,h,v,_]),k])}const x=a(r,[["render",y],["__file","dev_resource_pack.html.vue"]]),B=JSON.parse('{"path":"/en/dev/dev_resource_pack.html","title":"Resource Pack","lang":"en-US","frontmatter":{"title":"Resource Pack","icon":"box","order":1,"category":"development","description":" ,, Minecraft ,htmlc...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_resource_pack.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_resource_pack.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Resource Pack"}],["meta",{"property":"og:description","content":" ,, Minecraft ,htmlc..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Resource Pack\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[]},{"level":2,"title":"","slug":"","link":"#","children":[]}],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":2.13,"words":640},"filePathRelative":"en/dev/dev_resource_pack.md","localizedDate":"August 16, 2024","autoDesc":true}');export{x as comp,B as data};

View File

@ -1,15 +0,0 @@
import{_ as a,r as s,o as l,c as o,b as e,a as i,w as c,d as t,e as d}from"./app-Du8R6vOa.js";const r={},p=e("h2",{id:"简介",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#简介"},[e("span",null,"简介")])],-1),u=e("p",null,"资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码",-1),m=e("li",null,[t("资源包的制作很简单,如果你接触过"),e("code",null,"Minecraft"),t("的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。")],-1),h=e("li",null,[t("部分内容制作需要一点点前端基础,例如"),e("code",null,"html"),t(""),e("code",null,"css")],-1),v=e("li",null,[t("轻雪原版资源包请查看"),e("code",null,"LiteyukiBot/liteyuki/resources"),t(",可以在此基础上进行修改")],-1),_=e("li",null,"欢迎各位投稿资源包到轻雪资源商店",-1),k=d(`<p>请注意主题包中的html渲染使用Js来规定数据的渲染位置请确保您所编写的html代码能被Bot解析否则会导致渲染失败或渲染结果不理想/异常/错位等无法预料的事情发生。推荐在编写html时同时更改对应Js代码以避免出现无法预料的问题。</p><hr><h2 id="加载资源包" tabindex="-1"><a class="header-anchor" href="#加载资源包"><span>加载资源包</span></a></h2><ul><li>资源包通常是以<code>.zip</code>格式压缩的,只需要将其解压到根目录<code>resources</code>目录下即可,注意不要嵌套文件夹,正常的路径应该是这样的</li></ul><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>main.py
resources
resource_pack_1
metadata.yml
templates
<span class="token punctuation">..</span>.
resource_pack_2
metadata.yml
<span class="token punctuation">..</span>.
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>,<code>metadata.yml</code></li><li><code>metadata.yml</code></li></ul><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span>
<span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">&quot;1.0.0&quot;</span>
<span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span>
<span class="token comment"># 你可以自定义一些信息,但请保证以上三个字段</span>
<span class="token punctuation">...</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>A<code>index.html</code>B<code>index.html</code>BA<code>index.html</code></li><li>A<code>templates/index.html</code>B<code>templates/style.css</code>A<code>index.html</code><code>./style.css</code>Bcss</li></ul><div class="hint-container tip"><p class="hint-container-title"></p><p></p></div>`,9);function y(g,b){const n=s("RouteLink");return l(),o("div",null,[p,u,e("ul",null,[e("li",null,[i(n,{to:"/store/"},{default:c(()=>[t("/")]),_:1}),t("")]),m,h,v,_]),k])}const x=a(r,[["render",y],["__file","dev_resource_pack.html.vue"]]),B=JSON.parse('{"path":"/dev/dev_resource_pack.html","title":"","lang":"zh-CN","frontmatter":{"title":"","icon":"box","order":1,"category":"","description":" ,, Minecraft ,htmlc...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_resource_pack.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_resource_pack.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":""}],["meta",{"property":"og:description","content":" ,, Minecraft ,htmlc..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-11T21:26:36.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-11T21:26:36.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T21:26:36.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"","slug":"","link":"#","children":[]},{"level":2,"title":"","slug":"","link":"#","children":[]}],"git":{"createdTime":1723411596000,"updatedTime":1723411596000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":2.15,"words":644},"filePathRelative":"dev/dev_resource_pack.md","localizedDate":"2024811","autoDesc":true}');export{x as comp,B as data};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
import{_ as e,o as t,c as n,d as a}from"./app-EhCe7g9m.js";const s={},o=a(`<h3 id="class-event" tabindex="-1"><a class="header-anchor" href="#class-event"><span><strong>class</strong> <code>Event</code></span></a></h3><h3 id="method-init-self-name-str-data-dict-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str-data-dict-str-any"><span><em>method</em> <code>__init__(self, name: str, data: dict[str, Any])</code></span></a></h3><details><summary><b>Source code</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>name <span class="token operator">=</span> name
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,3),i=[o];function c(l,p){return t(),n("div",null,i)}const d=e(s,[["render",c],["__file","event.html.vue"]]),m=JSON.parse('{"path":"/en/api/comm/event.html","title":"liteyuki.comm.event","lang":"en-US","frontmatter":{"title":"liteyuki.comm.event","description":"class Event method __init__(self, name: str, data: dict[str, Any]) Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/comm/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/comm/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm.event"}],["meta",{"property":"og:description","content":"class Event method __init__(self, name: str, data: dict[str, Any]) Source code"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class Event","slug":"class-event","link":"#class-event","children":[]},{"level":3,"title":"method __init__(self, name: str, data: dict[str, Any])","slug":"method-init-self-name-str-data-dict-str-any","link":"#method-init-self-name-str-data-dict-str-any","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.12,"words":35},"filePathRelative":"en/api/comm/event.md","autoDesc":true}');export{d as comp,m as data};

View File

@ -0,0 +1,38 @@
import{_ as s,o as n,c as e,d as a}from"./app-EhCe7g9m.js";const t={},p=a(`<h3 id="class-messageevent" tabindex="-1"><a class="header-anchor" href="#class-messageevent"><span><strong>class</strong> <code>MessageEvent</code></span></a></h3><h3 id="method-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"><a class="header-anchor" href="#method-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"><span><em>method</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></span></a></h3><p><strong>Description</strong>: 轻雪抽象消息事件</p><details><summary><b>Source code</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> bot_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> message<span class="token punctuation">:</span> <span class="token builtin">list</span><span class="token punctuation">[</span><span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">|</span> <span class="token builtin">str</span><span class="token punctuation">,</span> message_type<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> raw_message<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> session_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> user_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> session_type<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> receive_channel<span class="token punctuation">:</span> Optional<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span><span class="token string">&#39;MessageEvent&#39;</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> Optional<span class="token punctuation">[</span><span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
轻雪抽象消息事件
Args:
bot_id: 机器人ID
message: 消息消息段数组[{type: str, data: dict[str, Any]}]
raw_message: 原始消息(通常为纯文本的格式)
message_type: 消息类型(private, group, other)
session_id: 会话ID(私聊通常为用户ID群聊通常为群ID)
session_type: 会话类型(private, group)
receive_channel: 接收频道(用于回复消息)
data: 附加数据
&quot;&quot;&quot;</span>
<span class="token keyword">if</span> data <span class="token keyword">is</span> <span class="token boolean">None</span><span class="token punctuation">:</span>
data <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
self<span class="token punctuation">.</span>message_type <span class="token operator">=</span> message_type
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
self<span class="token punctuation">.</span>bot_id <span class="token operator">=</span> bot_id
self<span class="token punctuation">.</span>message <span class="token operator">=</span> message
self<span class="token punctuation">.</span>raw_message <span class="token operator">=</span> raw_message
self<span class="token punctuation">.</span>session_id <span class="token operator">=</span> session_id
self<span class="token punctuation">.</span>session_type <span class="token operator">=</span> session_type
self<span class="token punctuation">.</span>user_id <span class="token operator">=</span> user_id
self<span class="token punctuation">.</span>receive_channel <span class="token operator">=</span> receive_channel
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h3 id="method-reply-self-message-str-dict-str-any" tabindex="-1"><a class="header-anchor" href="#method-reply-self-message-str-dict-str-any"><span><em>method</em> <code>reply(self, message: str | dict[str, Any])</code></span></a></h3><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>message:</li></ul></blockquote><details><summary><b>Source code</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">reply</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> message<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
回复消息
Args:
message:
Returns:
&quot;&quot;&quot;</span>
reply_event <span class="token operator">=</span> MessageEvent<span class="token punctuation">(</span>message_type<span class="token operator">=</span>self<span class="token punctuation">.</span>session_type<span class="token punctuation">,</span> message<span class="token operator">=</span>message<span class="token punctuation">,</span> raw_message<span class="token operator">=</span><span class="token string">&#39;&#39;</span><span class="token punctuation">,</span> data<span class="token operator">=</span><span class="token punctuation">{</span><span class="token string">&#39;message&#39;</span><span class="token punctuation">:</span> message<span class="token punctuation">}</span><span class="token punctuation">,</span> bot_id<span class="token operator">=</span>self<span class="token punctuation">.</span>bot_id<span class="token punctuation">,</span> session_id<span class="token operator">=</span>self<span class="token punctuation">.</span>session_id<span class="token punctuation">,</span> user_id<span class="token operator">=</span>self<span class="token punctuation">.</span>user_id<span class="token punctuation">,</span> session_type<span class="token operator">=</span>self<span class="token punctuation">.</span>session_type<span class="token punctuation">,</span> receive_channel<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">)</span>
<span class="token keyword">if</span> self<span class="token punctuation">.</span>receive_channel<span class="token punctuation">:</span>
self<span class="token punctuation">.</span>receive_channel<span class="token punctuation">.</span>send<span class="token punctuation">(</span>reply_event<span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,9),o=[p];function i(l,c){return n(),e("div",null,o)}const u=s(t,[["render",i],["__file","event.html.vue"]]),d=JSON.parse('{"path":"/en/api/message/event.html","title":"liteyuki.message.event","lang":"en-US","frontmatter":{"title":"liteyuki.message.event","description":"class MessageEvent method __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,...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/message/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/message/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message.event"}],["meta",{"property":"og:description","content":"class MessageEvent method __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,..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class MessageEvent","slug":"class-messageevent","link":"#class-messageevent","children":[]},{"level":3,"title":"method __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)","slug":"method-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","link":"#method-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","children":[]},{"level":3,"title":"method reply(self, message: str | dict[str, Any])","slug":"method-reply-self-message-str-dict-str-any","link":"#method-reply-self-message-str-dict-str-any","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.88,"words":264},"filePathRelative":"en/api/message/event.md","autoDesc":true}');export{u as comp,d as data};

View File

@ -1,4 +0,0 @@
import{_ as e,o as t,c as n,e as a}from"./app-Du8R6vOa.js";const s={},o=a(`<h3 id="class-event" tabindex="-1"><a class="header-anchor" href="#class-event"><span><em><strong>class</strong></em> <code>Event</code></span></a></h3><p>事件类</p><h3 id="def-init-self-name-str-data-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-init-self-name-str-data-dict-str-any-none"><span> <em><strong>def</strong></em> <code>__init__(self, name: str, data: dict[str, Any]) -&gt; None</code></span></a></h3><p></p><details><summary>源代码</summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>name <span class="token operator">=</span> name
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,5),i=[o];function c(p,l){return t(),n("div",null,i)}const d=e(s,[["render",c],["__file","event.html.vue"]]),m=JSON.parse('{"path":"/dev/api/comm/event.html","title":"liteyuki.comm.event","lang":"zh-CN","frontmatter":{"title":"liteyuki.comm.event","order":1,"icon":"laptop-code","category":"API","description":"class Event def __init__(self, name: str, data: dict[str, Any]) -> None ","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/comm/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.comm.event"}],["meta",{"property":"og:description","content":"class Event def __init__(self, name: str, data: dict[str, Any]) -> None "}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class Event","slug":"class-event","link":"#class-event","children":[]},{"level":3,"title":"def __init__(self, name: str, data: dict[str, Any]) -> None","slug":"def-init-self-name-str-data-dict-str-any-none","link":"#def-init-self-name-str-data-dict-str-any-none","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":0.16,"words":47},"filePathRelative":"dev/api/comm/event.md","localizedDate":"2024819","autoDesc":true}');export{d as comp,m as data};

View File

@ -0,0 +1,38 @@
import{_ as s,o as n,c as e,d as a}from"./app-EhCe7g9m.js";const t={},p=a(`<h3 id="class-messageevent" tabindex="-1"><a class="header-anchor" href="#class-messageevent"><span><strong>class</strong> <code>MessageEvent</code></span></a></h3><h3 id="method-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"><a class="header-anchor" href="#method-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"><span><em>method</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></span></a></h3><p><strong>说明</strong>: 轻雪抽象消息事件</p><details><summary><b>源代码</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> bot_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> message<span class="token punctuation">:</span> <span class="token builtin">list</span><span class="token punctuation">[</span><span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">|</span> <span class="token builtin">str</span><span class="token punctuation">,</span> message_type<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> raw_message<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> session_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> user_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> session_type<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> receive_channel<span class="token punctuation">:</span> Optional<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span><span class="token string">&#39;MessageEvent&#39;</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> Optional<span class="token punctuation">[</span><span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
轻雪抽象消息事件
Args:
bot_id: 机器人ID
message: 消息消息段数组[{type: str, data: dict[str, Any]}]
raw_message: 原始消息(通常为纯文本的格式)
message_type: 消息类型(private, group, other)
session_id: 会话ID(私聊通常为用户ID群聊通常为群ID)
session_type: 会话类型(private, group)
receive_channel: 接收频道(用于回复消息)
data: 附加数据
&quot;&quot;&quot;</span>
<span class="token keyword">if</span> data <span class="token keyword">is</span> <span class="token boolean">None</span><span class="token punctuation">:</span>
data <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
self<span class="token punctuation">.</span>message_type <span class="token operator">=</span> message_type
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
self<span class="token punctuation">.</span>bot_id <span class="token operator">=</span> bot_id
self<span class="token punctuation">.</span>message <span class="token operator">=</span> message
self<span class="token punctuation">.</span>raw_message <span class="token operator">=</span> raw_message
self<span class="token punctuation">.</span>session_id <span class="token operator">=</span> session_id
self<span class="token punctuation">.</span>session_type <span class="token operator">=</span> session_type
self<span class="token punctuation">.</span>user_id <span class="token operator">=</span> user_id
self<span class="token punctuation">.</span>receive_channel <span class="token operator">=</span> receive_channel
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h3 id="method-reply-self-message-str-dict-str-any" tabindex="-1"><a class="header-anchor" href="#method-reply-self-message-str-dict-str-any"><span><em>method</em> <code>reply(self, message: str | dict[str, Any])</code></span></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>message:</li></ul></blockquote><details><summary><b></b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">reply</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> message<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
回复消息
Args:
message:
Returns:
&quot;&quot;&quot;</span>
reply_event <span class="token operator">=</span> MessageEvent<span class="token punctuation">(</span>message_type<span class="token operator">=</span>self<span class="token punctuation">.</span>session_type<span class="token punctuation">,</span> message<span class="token operator">=</span>message<span class="token punctuation">,</span> raw_message<span class="token operator">=</span><span class="token string">&#39;&#39;</span><span class="token punctuation">,</span> data<span class="token operator">=</span><span class="token punctuation">{</span><span class="token string">&#39;message&#39;</span><span class="token punctuation">:</span> message<span class="token punctuation">}</span><span class="token punctuation">,</span> bot_id<span class="token operator">=</span>self<span class="token punctuation">.</span>bot_id<span class="token punctuation">,</span> session_id<span class="token operator">=</span>self<span class="token punctuation">.</span>session_id<span class="token punctuation">,</span> user_id<span class="token operator">=</span>self<span class="token punctuation">.</span>user_id<span class="token punctuation">,</span> session_type<span class="token operator">=</span>self<span class="token punctuation">.</span>session_type<span class="token punctuation">,</span> receive_channel<span class="token operator">=</span><span class="token boolean">None</span><span class="token punctuation">)</span>
<span class="token keyword">if</span> self<span class="token punctuation">.</span>receive_channel<span class="token punctuation">:</span>
self<span class="token punctuation">.</span>receive_channel<span class="token punctuation">.</span>send<span class="token punctuation">(</span>reply_event<span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,9),o=[p];function i(l,c){return n(),e("div",null,o)}const u=s(t,[["render",i],["__file","event.html.vue"]]),d=JSON.parse('{"path":"/api/message/event.html","title":"liteyuki.message.event","lang":"zh-CN","frontmatter":{"title":"liteyuki.message.event","description":"class MessageEvent method __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,...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/message/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/message/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.message.event"}],["meta",{"property":"og:description","content":"class MessageEvent method __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,..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class MessageEvent","slug":"class-messageevent","link":"#class-messageevent","children":[]},{"level":3,"title":"method __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)","slug":"method-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","link":"#method-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","children":[]},{"level":3,"title":"method reply(self, message: str | dict[str, Any])","slug":"method-reply-self-message-str-dict-str-any","link":"#method-reply-self-message-str-dict-str-any","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.9,"words":269},"filePathRelative":"api/message/event.md","autoDesc":true}');export{u as comp,d as data};

View File

@ -0,0 +1,4 @@
import{_ as t,o as e,c as n,d as a}from"./app-EhCe7g9m.js";const s={},i=a(`<h3 id="class-event" tabindex="-1"><a class="header-anchor" href="#class-event"><span><strong>class</strong> <code>Event</code></span></a></h3><h3 id="method-init-self-name-str-data-dict-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str-data-dict-str-any"><span><em>method</em> <code>__init__(self, name: str, data: dict[str, Any])</code></span></a></h3><details><summary><b>源代码</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>name <span class="token operator">=</span> name
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,3),o=[i];function c(l,p){return e(),n("div",null,o)}const d=t(s,[["render",c],["__file","event.html.vue"]]),m=JSON.parse('{"path":"/api/comm/event.html","title":"liteyuki.comm.event","lang":"zh-CN","frontmatter":{"title":"liteyuki.comm.event","description":"class Event method __init__(self, name: str, data: dict[str, Any]) ","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/comm/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/comm/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.comm.event"}],["meta",{"property":"og:description","content":"class Event method __init__(self, name: str, data: dict[str, Any]) "}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class Event","slug":"class-event","link":"#class-event","children":[]},{"level":3,"title":"method __init__(self, name: str, data: dict[str, Any])","slug":"method-init-self-name-str-data-dict-str-any","link":"#method-init-self-name-str-data-dict-str-any","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.12,"words":36},"filePathRelative":"api/comm/event.md","autoDesc":true}');export{d as comp,m as data};

View File

@ -1,4 +0,0 @@
import{_ as e,o as t,c as n,e as a}from"./app-Du8R6vOa.js";const s={},o=a(`<h3 id="class-event" tabindex="-1"><a class="header-anchor" href="#class-event"><span><em><strong>class</strong></em> <code>Event</code></span></a></h3><p>事件类</p><h3 id="def-init-self-name-str-data-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-init-self-name-str-data-dict-str-any-none"><span> <em><strong>def</strong></em> <code>__init__(self, name: str, data: dict[str, Any]) -&gt; None</code></span></a></h3><p></p><details><summary>源代码</summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> data<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Any<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
self<span class="token punctuation">.</span>name <span class="token operator">=</span> name
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,5),i=[o];function c(p,l){return t(),n("div",null,i)}const d=e(s,[["render",c],["__file","event.html.vue"]]),m=JSON.parse('{"path":"/en/dev/api/comm/event.html","title":"liteyuki.comm.event","lang":"en-US","frontmatter":{"title":"liteyuki.comm.event","order":1,"icon":"laptop-code","category":"API","description":"class Event def __init__(self, name: str, data: dict[str, Any]) -> None ","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/event.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/comm/event.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm.event"}],["meta",{"property":"og:description","content":"class Event def __init__(self, name: str, data: dict[str, Any]) -> None "}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class Event","slug":"class-event","link":"#class-event","children":[]},{"level":3,"title":"def __init__(self, name: str, data: dict[str, Any]) -> None","slug":"def-init-self-name-str-data-dict-str-any-none","link":"#def-init-self-name-str-data-dict-str-any-none","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.16,"words":47},"filePathRelative":"en/dev/api/comm/event.md","localizedDate":"August 21, 2024","autoDesc":true}');export{d as comp,m as data};

View File

@ -1 +0,0 @@
import{_ as t,o as i,c as o,b as e,d as n}from"./app-Du8R6vOa.js";const c={},a=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception"},[e("span",null,[e("em",null,[e("strong",null,"class")]),n(),e("code",null,"LiteyukiException(BaseException)")])])],-1),p=e("p",null,"Liteyuki的异常基类。",-1),l=[a,p];function s(r,d){return i(),o("div",null,l)}const u=t(c,[["render",s],["__file","exception.html.vue"]]),y=JSON.parse('{"path":"/en/dev/api/exception.html","title":"liteyuki.exception","lang":"en-US","frontmatter":{"title":"liteyuki.exception","order":1,"icon":"laptop-code","category":"API","description":"class LiteyukiException(BaseException) Liteyuki的异常基类。","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/exception.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/exception.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.exception"}],["meta",{"property":"og:description","content":"class LiteyukiException(BaseException) Liteyuki的异常基类。"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.06,"words":18},"filePathRelative":"en/dev/api/exception.md","localizedDate":"August 21, 2024","autoDesc":true}');export{u as comp,y as data};

View File

@ -1 +0,0 @@
import{_ as t,o as i,c as o,b as e,d as n}from"./app-Du8R6vOa.js";const c={},a=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception"},[e("span",null,[e("em",null,[e("strong",null,"class")]),n(),e("code",null,"LiteyukiException(BaseException)")])])],-1),p=e("p",null,"Liteyuki的异常基类。",-1),l=[a,p];function s(r,d){return i(),o("div",null,l)}const u=t(c,[["render",s],["__file","exception.html.vue"]]),y=JSON.parse('{"path":"/dev/api/exception.html","title":"liteyuki.exception","lang":"zh-CN","frontmatter":{"title":"liteyuki.exception","order":1,"icon":"laptop-code","category":"API","description":"class LiteyukiException(BaseException) Liteyuki的异常基类。","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/exception.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/exception.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.exception"}],["meta",{"property":"og:description","content":"class LiteyukiException(BaseException) Liteyuki的异常基类。"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:43:46.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:43:46.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:43:46.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724031826000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.06,"words":18},"filePathRelative":"dev/api/exception.md","localizedDate":"2024年8月19日","autoDesc":true}');export{u as comp,y as data};

View File

@ -0,0 +1 @@
import{_ as t,o as i,c as o,a as e,b as n}from"./app-EhCe7g9m.js";const c={},a=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception"},[e("span",null,[e("strong",null,"class"),n(),e("code",null,"LiteyukiException(BaseException)")])])],-1),p=[a];function l(s,r){return i(),o("div",null,p)}const d=t(c,[["render",l],["__file","exception.html.vue"]]),x=JSON.parse('{"path":"/en/api/exception.html","title":"liteyuki.exception","lang":"en-US","frontmatter":{"title":"liteyuki.exception","description":"class LiteyukiException(BaseException)","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/exception.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/exception.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.exception"}],["meta",{"property":"og:description","content":"class LiteyukiException(BaseException)"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"en/api/exception.md","autoDesc":true}');export{d as comp,x as data};

View File

@ -0,0 +1 @@
import{_ as t,o as i,c as o,a as e,b as n}from"./app-EhCe7g9m.js";const c={},a=e("h3",{id:"class-liteyukiexception-baseexception",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-liteyukiexception-baseexception"},[e("span",null,[e("strong",null,"class"),n(),e("code",null,"LiteyukiException(BaseException)")])])],-1),p=[a];function l(s,r){return i(),o("div",null,p)}const d=t(c,[["render",l],["__file","exception.html.vue"]]),x=JSON.parse('{"path":"/api/exception.html","title":"liteyuki.exception","lang":"zh-CN","frontmatter":{"title":"liteyuki.exception","description":"class LiteyukiException(BaseException)","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/exception.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/exception.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.exception"}],["meta",{"property":"og:description","content":"class LiteyukiException(BaseException)"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"api/exception.md","autoDesc":true}');export{d as comp,x as data};

View File

@ -1,4 +1,4 @@
import{_ as t,o as e,c as a,e as n}from"./app-Du8R6vOa.js";const s={},r=n(`<h2 id="功能插件命令" tabindex="-1"><a class="header-anchor" href="#功能插件命令"><span>功能插件命令</span></a></h2><h3 id="轻雪天气liteyuki-weather" tabindex="-1"><a class="header-anchor" href="#轻雪天气liteyuki-weather"><span><strong>轻雪天气<code>liteyuki_weather</code></strong></span></a></h3><p>查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。</p><p>配置项</p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">weather_key</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span> <span class="token comment"># 和风天气的天气key会自动判断key版本</span>
import{_ as t,o as e,c as a,d as n}from"./app-EhCe7g9m.js";const s={},r=n(`<h2 id="功能插件命令" tabindex="-1"><a class="header-anchor" href="#功能插件命令"><span>功能插件命令</span></a></h2><h3 id="轻雪天气liteyuki-weather" tabindex="-1"><a class="header-anchor" href="#轻雪天气liteyuki-weather"><span><strong>轻雪天气<code>liteyuki_weather</code></strong></span></a></h3><p>查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。</p><p>配置项</p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">weather_key</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span> <span class="token comment"># 和风天气的天气key会自动判断key版本</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p></p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>weather <span class="token operator">&lt;</span>keywords<span class="token punctuation">..</span>.<span class="token operator">&gt;</span> <span class="token comment"># Keywords</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>&quot; &quot;, &quot;weather Tokyo Shinjuku&quot;</p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>bind-city <span class="token operator">&lt;</span>keywords<span class="token punctuation">..</span>.<span class="token operator">&gt;</span> <span class="token comment"># Keywords</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p></p><h4 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h4><table><thead><tr><th style="text-align:center;"></th><th style="text-align:left;"></th></tr></thead><tbody><tr><td style="text-align:center;">weather</td><td style="text-align:left;"></td></tr><tr><td style="text-align:center;">bind-city</td><td style="text-align:left;"></td></tr></tbody></table><hr><h3 id="liteyuki-statistics" tabindex="-1"><a class="header-anchor" href="#liteyuki-statistics"><span><strong><code>liteyuki_statistics</code></strong></span></a></h3><p> </p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>statistic message <span class="token parameter variable">--duration</span> <span class="token operator">&lt;</span>duration<span class="token operator">&gt;</span> <span class="token parameter variable">--period</span> <span class="token operator">&lt;</span>period<span class="token operator">&gt;</span> <span class="token parameter variable">--group</span> <span class="token punctuation">[</span>current<span class="token operator">|</span>group_id<span class="token punctuation">]</span> <span class="token parameter variable">--bot</span> <span class="token punctuation">[</span>current<span class="token operator">|</span>bot_id<span class="token punctuation">]</span>

View File

@ -1,4 +1,4 @@
import{_ as t,o as e,c as a,e as n}from"./app-Du8R6vOa.js";const s={},r=n(`<h2 id="功能插件命令" tabindex="-1"><a class="header-anchor" href="#功能插件命令"><span>功能插件命令</span></a></h2><h3 id="轻雪天气liteyuki-weather" tabindex="-1"><a class="header-anchor" href="#轻雪天气liteyuki-weather"><span><strong>轻雪天气<code>liteyuki_weather</code></strong></span></a></h3><p>查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。</p><p>配置项</p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">weather_key</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span> <span class="token comment"># 和风天气的天气key会自动判断key版本</span>
import{_ as t,o as e,c as a,d as n}from"./app-EhCe7g9m.js";const s={},r=n(`<h2 id="功能插件命令" tabindex="-1"><a class="header-anchor" href="#功能插件命令"><span>功能插件命令</span></a></h2><h3 id="轻雪天气liteyuki-weather" tabindex="-1"><a class="header-anchor" href="#轻雪天气liteyuki-weather"><span><strong>轻雪天气<code>liteyuki_weather</code></strong></span></a></h3><p>查询实时天气,支持绑定城市,支持中英文城市名,支持多个关键词查询。</p><p>配置项</p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">weather_key</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span> <span class="token comment"># 和风天气的天气key会自动判断key版本</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p></p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>weather <span class="token operator">&lt;</span>keywords<span class="token punctuation">..</span>.<span class="token operator">&gt;</span> <span class="token comment"># Keywords</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>&quot; &quot;, &quot;weather Tokyo Shinjuku&quot;</p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>bind-city <span class="token operator">&lt;</span>keywords<span class="token punctuation">..</span>.<span class="token operator">&gt;</span> <span class="token comment"># Keywords</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p></p><h4 id="" tabindex="-1"><a class="header-anchor" href="#"><span></span></a></h4><table><thead><tr><th style="text-align:center;"></th><th style="text-align:left;"></th></tr></thead><tbody><tr><td style="text-align:center;">weather</td><td style="text-align:left;"></td></tr><tr><td style="text-align:center;">bind-city</td><td style="text-align:left;"></td></tr></tbody></table><hr><h3 id="liteyuki-statistics" tabindex="-1"><a class="header-anchor" href="#liteyuki-statistics"><span><strong><code>liteyuki_statistics</code></strong></span></a></h3><p> </p><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>statistic message <span class="token parameter variable">--duration</span> <span class="token operator">&lt;</span>duration<span class="token operator">&gt;</span> <span class="token parameter variable">--period</span> <span class="token operator">&lt;</span>period<span class="token operator">&gt;</span> <span class="token parameter variable">--group</span> <span class="token punctuation">[</span>current<span class="token operator">|</span>group_id<span class="token punctuation">]</span> <span class="token parameter variable">--bot</span> <span class="token punctuation">[</span>current<span class="token operator">|</span>bot_id<span class="token punctuation">]</span>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as o}from"./app-EhCe7g9m.js";const a={};function n(i,r){return t(),o("div")}const l=e(a,[["render",n],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/api/","title":"liteyuki","lang":"zh-CN","frontmatter":{"title":"liteyuki","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"api/index.md"}');export{l as comp,c as data};

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(n,r){return t(),o("div")}const s=e(a,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/dev/api/message/","title":"liteyuki.message","lang":"zh-CN","frontmatter":{"title":"liteyuki.message","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.message"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"dev/api/message/README.md","localizedDate":"2024年8月21日"}');export{s as comp,m as data};

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
import{_ as e,o as t,c as n,e as s}from"./app-Du8R6vOa.js";const a={},i=s(`<h3 id="def-get-loaded-plugins-dict-str-plugin" tabindex="-1"><a class="header-anchor" href="#def-get-loaded-plugins-dict-str-plugin"><span><em><strong>def</strong></em> <code>get_loaded_plugins() -&gt; dict[str, Plugin]</code></span></a></h3><p>获取已加载的插件</p><p>Returns:</p><pre><code>dict[str, Plugin]: 插件字典
</code></pre><details><summary></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">get_loaded_plugins</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
获取已加载的插件
Returns:
dict[str, Plugin]: 插件字典
&quot;&quot;&quot;</span>
<span class="token keyword">return</span> _plugins
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,5),o=[i];function l(p,d){return t(),n("div",null,o)}const c=e(a,[["render",l],["__file","index.html.vue"]]),u=JSON.parse('{"path":"/dev/api/plugin/","title":"liteyuki.plugin","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin","index":true,"icon":"laptop-code","category":"API","description":"def get_loaded_plugins() -> dict[str, Plugin] Returns: ","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.plugin"}],["meta",{"property":"og:description","content":"def get_loaded_plugins() -> dict[str, Plugin] Returns: "}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def get_loaded_plugins() -> dict[str, Plugin]","slug":"def-get-loaded-plugins-dict-str-plugin","link":"#def-get-loaded-plugins-dict-str-plugin","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":0.2,"words":61},"filePathRelative":"dev/api/plugin/README.md","localizedDate":"2024819","autoDesc":true}');export{c as comp,u as data};

View File

@ -1 +1 @@
import{_ as t,r as o,o as a,c as n,a as r}from"./app-Du8R6vOa.js";const i={};function c(p,s){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(i,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/store/","title":"资源及插件商店","lang":"zh-CN","frontmatter":{"title":"资源及插件商店","index":false,"icon":"store","category":"商店","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"资源及插件商店"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-11T21:26:36.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-11T21:26:36.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源及插件商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T21:26:36.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1712364501000,"updatedTime":1723411596000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":5}]},"readingTime":{"minutes":0.06,"words":17},"filePathRelative":"store/README.md","localizedDate":"2024年4月6日"}');export{m as comp,d as data};
import{_ as t,r as o,o as a,c as n,e as r}from"./app-EhCe7g9m.js";const i={};function c(p,s){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(i,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/store/","title":"资源及插件商店","lang":"zh-CN","frontmatter":{"title":"资源及插件商店","index":false,"icon":"store","category":"商店","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"资源及插件商店"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-11T21:26:36.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-11T21:26:36.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源及插件商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T21:26:36.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1712364501000,"updatedTime":1723411596000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":5}]},"readingTime":{"minutes":0.06,"words":17},"filePathRelative":"store/README.md","localizedDate":"2024年4月6日"}');export{m as comp,d as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as o}from"./app-EhCe7g9m.js";const r={};function n(a,i){return t(),o("div")}const p=e(r,[["render",n],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/en/api/core/","title":"liteyuki.core","lang":"en-US","frontmatter":{"title":"liteyuki.core","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/core/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.core"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/api/core/index.md"}');export{p as comp,l as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as o}from"./app-EhCe7g9m.js";const n={};function a(i,r){return t(),o("div")}const m=e(n,[["render",a],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/en/api/comm/","title":"liteyuki.comm","lang":"en-US","frontmatter":{"title":"liteyuki.comm","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/comm/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/comm/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/api/comm/index.md"}');export{m as comp,p as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as a}from"./app-EhCe7g9m.js";const o={};function n(i,r){return t(),a("div")}const p=e(o,[["render",n],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/api/message/","title":"liteyuki.message","lang":"zh-CN","frontmatter":{"title":"liteyuki.message","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/message/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/message/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.message"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"api/message/index.md"}');export{p as comp,l as data};

View File

@ -1 +1 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const i={};function a(s,l){return t(),o("div")}const c=e(i,[["render",a],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"icon":"home","title":"首页","heroImage":"https://cdn.liteyuki.icu/static/svg/lylogo-full.svg","heroImageDark":"https://cdn.liteyuki.icu/static/svg/lylogo-full-dark.svg","bgImage":null,"bgImageDark":null,"bgImageStyle":{"background-attachment":"fixed"},"heroText":"LiteyukiBot","tagline":"LiteyukiBot 轻雪机器人,综合性的机器人应用及管理框架","actions":[{"text":"快速部署","icon":"rocket","link":"./deploy/install.html","type":"primary"},{"text":"使用手册","icon":"book","link":"./usage/basic_command.html"}],"highlights":[{"header":"简洁至上","image":"/assets/image/layout.svg","bgImage":"https://theme-hope-assets.vuejs.press/bg/2-light.svg","bgImageDark":"https://theme-hope-assets.vuejs.press/bg/2-dark.svg","bgImageStyle":{"background-repeat":"repeat","background-size":"initial"},"features":[{"title":"支持多种框架","icon":"robot","details":"兼容nonebotmelobot等拥有良好的生态支持","link":"https://nonebot.dev/"},{"title":"便捷管理","icon":"plug","details":"使用包管理器,便捷管理插件及资源包"},{"title":"主题支持","icon":"paint-brush","details":"使用资源包对外观进行完全自定义","link":"https://bot.liteyuki.icu/usage/resource_pack.html"},{"title":"国际化","icon":"globe","details":"通过资源包支持多种语言","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"简易使用","icon":"cog","details":"无需繁琐前期过程,开箱即用","link":"https://bot.liteyuki.icu/deployment/config.html"},{"title":"超高性能","icon":"tachometer-alt","details":"500个插件2s内启动"},{"title":"滚动更新","icon":"cloud-download","details":"让你的机器人保持最新提交"},{"title":"开源项目","icon":"code","details":"项目遵循MIT LICENCE开源欢迎各位的贡献"}]},{"header":"快速部署","image":"/assets/image/box.svg","bgImage":"https://theme-hope-assets.vuejs.press/bg/3-light.svg","bgImageDark":"https://theme-hope-assets.vuejs.press/bg/3-dark.svg","highlights":[{"title":"安装 Git 及 Python3.10+"},{"title":"使用 <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> 以克隆项目至本地。","details":"如果无法连接到GitHub可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot --depth=1</code>。"},{"title":"使用 <code>cd LiteyukiBot</code> 切换到项目目录。"},{"title":"使用 <code>pip install -r requirements.txt</code> 安装项目依赖。","details":"如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。"},{"title":"使用 <code>python main.py</code> 启动项目。"}]}],"copyright":"© 2021-2024 SnowyKami All Rights Reserved","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"首页"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-18T15:43:48.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-18T15:43:48.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"首页\\"}"]]},"headers":[],"git":{"createdTime":1711460020000,"updatedTime":1723995828000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":43},{"name":"Nanaloveyuki","email":"miaomiao_159@outlook.com","commits":1},{"name":"Snowykami","email":"79104275+snowykami@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":1.37,"words":411},"filePathRelative":"README.md","localizedDate":"2024年3月26日"}');export{c as comp,m as data};
import{_ as e,o as t,c as o}from"./app-EhCe7g9m.js";const i={};function a(s,l){return t(),o("div")}const c=e(i,[["render",a],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"icon":"home","title":"首页","heroImage":"https://cdn.liteyuki.icu/static/svg/lylogo-full.svg","heroImageDark":"https://cdn.liteyuki.icu/static/svg/lylogo-full-dark.svg","bgImage":null,"bgImageDark":null,"bgImageStyle":{"background-attachment":"fixed"},"heroText":"LiteyukiBot","tagline":"LiteyukiBot 轻雪机器人,综合性的机器人应用及管理框架","actions":[{"text":"快速部署","icon":"rocket","link":"./deploy/install.html","type":"primary"},{"text":"使用手册","icon":"book","link":"./usage/basic_command.html"}],"highlights":[{"header":"简洁至上","image":"/assets/image/layout.svg","bgImage":"https://theme-hope-assets.vuejs.press/bg/2-light.svg","bgImageDark":"https://theme-hope-assets.vuejs.press/bg/2-dark.svg","bgImageStyle":{"background-repeat":"repeat","background-size":"initial"},"features":[{"title":"支持多种框架","icon":"robot","details":"兼容nonebotmelobot等拥有良好的生态支持","link":"https://nonebot.dev/"},{"title":"便捷管理","icon":"plug","details":"使用包管理器,便捷管理插件及资源包"},{"title":"主题支持","icon":"paint-brush","details":"使用资源包对外观进行完全自定义","link":"https://bot.liteyuki.icu/usage/resource_pack.html"},{"title":"国际化","icon":"globe","details":"通过资源包支持多种语言","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"简易使用","icon":"cog","details":"无需繁琐前期过程,开箱即用","link":"https://bot.liteyuki.icu/deployment/config.html"},{"title":"超高性能","icon":"tachometer-alt","details":"500个插件2s内启动"},{"title":"滚动更新","icon":"cloud-download","details":"让你的机器人保持最新提交"},{"title":"开源项目","icon":"code","details":"项目遵循MIT LICENCE开源欢迎各位的贡献"}]},{"header":"快速部署","image":"/assets/image/box.svg","bgImage":"https://theme-hope-assets.vuejs.press/bg/3-light.svg","bgImageDark":"https://theme-hope-assets.vuejs.press/bg/3-dark.svg","highlights":[{"title":"安装 Git 及 Python3.10+"},{"title":"使用 <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> 以克隆项目至本地。","details":"如果无法连接到GitHub可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot --depth=1</code>。"},{"title":"使用 <code>cd LiteyukiBot</code> 切换到项目目录。"},{"title":"使用 <code>pip install -r requirements.txt</code> 安装项目依赖。","details":"如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>。"},{"title":"使用 <code>python main.py</code> 启动项目。"}]}],"copyright":"© 2021-2024 SnowyKami All Rights Reserved","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"首页"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-18T15:43:48.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-18T15:43:48.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"首页\\"}"]]},"headers":[],"git":{"createdTime":1711460020000,"updatedTime":1723995828000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":43},{"name":"Nanaloveyuki","email":"miaomiao_159@outlook.com","commits":1},{"name":"Snowykami","email":"79104275+snowykami@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":1.37,"words":411},"filePathRelative":"README.md","localizedDate":"2024年3月26日"}');export{c as comp,m as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as n}from"./app-EhCe7g9m.js";const o={};function a(i,r){return t(),n("div")}const l=e(o,[["render",a],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/en/api/dev/","title":"liteyuki.dev","lang":"en-US","frontmatter":{"title":"liteyuki.dev","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/dev/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.dev"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/api/dev/index.md"}');export{l as comp,c as data};

View File

@ -1 +1 @@
import{_ as t,r as o,o as a,c as n,a as r}from"./app-Du8R6vOa.js";const p={};function c(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(p,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/usage/","title":"使用手册","lang":"zh-CN","frontmatter":{"title":"使用手册","index":false,"icon":"laptop-code","category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"使用手册"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-03-28T04:05:03.000Z"}],["meta",{"property":"article:modified_time","content":"2024-03-28T04:05:03.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"使用手册\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-03-28T04:05:03.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1711589926000,"updatedTime":1711598703000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.06,"words":17},"filePathRelative":"usage/README.md","localizedDate":"2024年3月28日"}');export{m as comp,d as data};
import{_ as t,r as o,o as a,c as n,e as r}from"./app-EhCe7g9m.js";const p={};function c(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(p,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/usage/","title":"使用手册","lang":"zh-CN","frontmatter":{"title":"使用手册","index":false,"icon":"laptop-code","category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"使用手册"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-03-28T04:05:03.000Z"}],["meta",{"property":"article:modified_time","content":"2024-03-28T04:05:03.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"使用手册\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-03-28T04:05:03.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1711589926000,"updatedTime":1711598703000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.06,"words":17},"filePathRelative":"usage/README.md","localizedDate":"2024年3月28日"}');export{m as comp,d as data};

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(n,r){return t(),o("div")}const c=e(a,[["render",i],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/dev/api/dev/","title":"liteyuki.dev","lang":"zh-CN","frontmatter":{"title":"liteyuki.dev","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/dev/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.dev"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:43:46.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:43:46.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:43:46.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724031826000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"dev/api/dev/README.md","localizedDate":"2024年8月19日"}');export{c as comp,d as data};

View File

@ -0,0 +1,9 @@
import{_ as n,o as e,c as a,d as s}from"./app-EhCe7g9m.js";const t={},l=s(`<h3 id="func-default-plugins-loader" tabindex="-1"><a class="header-anchor" href="#func-default-plugins-loader"><span><em>func</em> <code>default_plugins_loader()</code></span></a></h3><p><strong>说明</strong>: 默认插件加载器,应在初始化时调用</p><details><summary><b>源代码</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">default_plugins_loader</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
默认插件加载器应在初始化时调用
&quot;&quot;&quot;</span>
<span class="token keyword">for</span> plugin <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">&#39;liteyuki.plugins&#39;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
load_plugin<span class="token punctuation">(</span>plugin<span class="token punctuation">)</span>
<span class="token keyword">for</span> plugin_dir <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">&#39;liteyuki.plugin_dirs&#39;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&#39;src/liteyuki_plugins&#39;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
load_plugins<span class="token punctuation">(</span>plugin_dir<span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,3),i=[l];function p(o,u){return e(),a("div",null,i)}const r=n(t,[["render",p],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/api/plugins/plugin_loader/","title":"liteyuki.plugins.plugin_loader","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugins.plugin_loader","description":"func default_plugins_loader() : ","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/plugins/plugin_loader/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/plugins/plugin_loader/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.plugins.plugin_loader"}],["meta",{"property":"og:description","content":"func default_plugins_loader() : "}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.plugin_loader\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"func default_plugins_loader()","slug":"func-default-plugins-loader","link":"#func-default-plugins-loader","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.21,"words":63},"filePathRelative":"api/plugins/plugin_loader/index.md","autoDesc":true}');export{r as comp,d as data};

View File

@ -0,0 +1 @@
import{_ as t,r as n,o,c as a,e as s}from"./app-EhCe7g9m.js";const p={};function l(r,i){const e=n("Catalog");return o(),a("div",null,[s(e)])}const m=t(p,[["render",l],["__file","index.html.vue"]]),g=JSON.parse('{"path":"/en/api/plugins/","title":"Plugins","lang":"zh-CN","frontmatter":{"title":"Plugins","article":false,"feed":false,"sitemap":false,"head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/plugins/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"Plugins"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Plugins\\"}"]]},"headers":[],"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{m as comp,g as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as o}from"./app-EhCe7g9m.js";const r={};function a(n,i){return t(),o("div")}const p=e(r,[["render",a],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/api/core/","title":"liteyuki.core","lang":"zh-CN","frontmatter":{"title":"liteyuki.core","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/api/core/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.core"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"api/core/index.md"}');export{p as comp,l as data};

View File

@ -1 +1 @@
import{_ as t,r as o,o as a,c as n,a as r}from"./app-Du8R6vOa.js";const p={};function c(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const s=t(p,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/deploy/","title":"项目部署","lang":"zh-CN","frontmatter":{"title":"项目部署","index":false,"icon":"laptop-code","category":"部署","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/deploy/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/deploy/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"项目部署"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"项目部署\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723832665000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.05,"words":15},"filePathRelative":"deploy/README.md","localizedDate":"2024年8月16日"}');export{s as comp,d as data};
import{_ as t,r as o,o as a,c as n,e as r}from"./app-EhCe7g9m.js";const p={};function c(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const s=t(p,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/deploy/","title":"项目部署","lang":"zh-CN","frontmatter":{"title":"项目部署","index":false,"icon":"laptop-code","category":"部署","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/deploy/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/deploy/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"项目部署"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"项目部署\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723832665000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.05,"words":15},"filePathRelative":"deploy/README.md","localizedDate":"2024年8月16日"}');export{s as comp,d as data};

View File

@ -0,0 +1,8 @@
import{_ as e,o as t,c as n,d as s}from"./app-EhCe7g9m.js";const i={},a=s(`<h3 id="func-get-loaded-plugins-dict-str-plugin" tabindex="-1"><a class="header-anchor" href="#func-get-loaded-plugins-dict-str-plugin"><span><em>func</em> <code>get_loaded_plugins() -&gt; dict[str, Plugin]</code></span></a></h3><p><strong>Description</strong>: 获取已加载的插件</p><p><strong>Return</strong>: dict[str, Plugin]: 插件字典</p><details><summary><b>Source code</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">get_loaded_plugins</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> <span class="token builtin">dict</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
获取已加载的插件
Returns:
dict[str, Plugin]: 插件字典
&quot;&quot;&quot;</span>
<span class="token keyword">return</span> _plugins
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,4),l=[a];function o(p,c){return t(),n("div",null,l)}const u=e(i,[["render",o],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/api/plugin/","title":"liteyuki.plugin","lang":"en-US","frontmatter":{"title":"liteyuki.plugin","description":"func get_loaded_plugins() -> dict[str, Plugin] Description: Return: dict[str, Plugin]: Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/plugin/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/plugin/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugin"}],["meta",{"property":"og:description","content":"func get_loaded_plugins() -> dict[str, Plugin] Description: Return: dict[str, Plugin]: Source code"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"func get_loaded_plugins() -> dict[str, Plugin]","slug":"func-get-loaded-plugins-dict-str-plugin","link":"#func-get-loaded-plugins-dict-str-plugin","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.19,"words":56},"filePathRelative":"en/api/plugin/index.md","autoDesc":true}');export{u as comp,d as data};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(n,r){return t(),o("div")}const s=e(a,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/en/dev/api/message/","title":"liteyuki.message","lang":"en-US","frontmatter":{"title":"liteyuki.message","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"en/dev/api/message/README.md","localizedDate":"August 21, 2024"}');export{s as comp,m as data};

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(n,r){return t(),o("div")}const c=e(a,[["render",i],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/dev/api/","title":"liteyuki","lang":"zh-CN","frontmatter":{"title":"liteyuki","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:43:46.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:43:46.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:43:46.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724031826000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"dev/api/README.md","localizedDate":"2024年8月19日"}');export{c as comp,l as data};

View File

@ -1 +1 @@
import{_ as t,r as o,o as a,c as n,a as r}from"./app-Du8R6vOa.js";const c={};function p(s,i){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(c,[["render",p],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/usage/","title":"Usage","lang":"en-US","frontmatter":{"title":"Usage","index":false,"icon":"laptop-code","category":"usage","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Usage"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Usage\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.04,"words":11},"filePathRelative":"en/usage/README.md","localizedDate":"August 16, 2024"}');export{m as comp,d as data};
import{_ as t,r as o,o as a,c as n,e as r}from"./app-EhCe7g9m.js";const c={};function p(s,i){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(c,[["render",p],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/usage/","title":"Usage","lang":"en-US","frontmatter":{"title":"Usage","index":false,"icon":"laptop-code","category":"usage","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/usage/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/usage/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Usage"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Usage\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.04,"words":11},"filePathRelative":"en/usage/README.md","localizedDate":"August 16, 2024"}');export{m as comp,d as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as n}from"./app-EhCe7g9m.js";const o={};function a(i,r){return t(),n("div")}const l=e(o,[["render",a],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/en/api/","title":"liteyuki","lang":"en-US","frontmatter":{"title":"liteyuki","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/api/index.md"}');export{l as comp,c as data};

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(n,m){return t(),o("div")}const c=e(a,[["render",i],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/en/dev/api/comm/","title":"liteyuki.comm","lang":"en-US","frontmatter":{"title":"liteyuki.comm","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/comm/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"en/dev/api/comm/README.md","localizedDate":"August 21, 2024"}');export{c as comp,p as data};

View File

@ -1 +0,0 @@
import{_ as e,o as t,c as o}from"./app-Du8R6vOa.js";const a={};function i(m,n){return t(),o("div")}const c=e(a,[["render",i],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/dev/api/comm/","title":"liteyuki.comm","lang":"zh-CN","frontmatter":{"title":"liteyuki.comm","index":true,"icon":"laptop-code","category":"API","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/comm/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/comm/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.comm"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:43:46.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:43:46.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:43:46.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724031826000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.03,"words":9},"filePathRelative":"dev/api/comm/README.md","localizedDate":"2024年8月19日"}');export{c as comp,p as data};

View File

@ -1 +0,0 @@
import{_ as t,r as o,o as a,c as n,a as r}from"./app-Du8R6vOa.js";const p={};function c(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const s=t(p,[["render",c],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/dev/","title":"开发及贡献","lang":"zh-CN","frontmatter":{"title":"开发及贡献","index":false,"icon":"laptop-code","category":"开发","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"开发及贡献"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-11T21:26:36.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-11T21:26:36.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"开发及贡献\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T21:26:36.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723411596000,"updatedTime":1723411596000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"dev/README.md","localizedDate":"2024年8月11日"}');export{s as comp,d as data};

View File

@ -0,0 +1 @@
import{_ as t,r as o,o as n,c as r,e as a}from"./app-EhCe7g9m.js";const s={};function i(c,p){const e=o("Catalog");return n(),r("div",null,[a(e)])}const m=t(s,[["render",i],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/store/","title":"Extensions Store","lang":"en-US","frontmatter":{"title":"Extensions Store","index":false,"icon":"store","category":"store","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/store/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Extensions Store"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T18:24:25.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T18:24:25.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Extensions Store\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-16T18:24:25.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.04,"words":11},"filePathRelative":"en/store/README.md","localizedDate":"August 16, 2024"}');export{m as comp,d as data};

View File

@ -0,0 +1,9 @@
import{_ as n,o as e,c as a,d as s}from"./app-EhCe7g9m.js";const t={},i=s(`<h3 id="func-default-plugins-loader" tabindex="-1"><a class="header-anchor" href="#func-default-plugins-loader"><span><em>func</em> <code>default_plugins_loader()</code></span></a></h3><p><strong>Description</strong>: 默认插件加载器,应在初始化时调用</p><details><summary><b>Source code</b></summary><div class="language-python line-numbers-mode" data-ext="py" data-title="py"><pre class="language-python"><code><span class="token keyword">def</span> <span class="token function">default_plugins_loader</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
<span class="token triple-quoted-string string">&quot;&quot;&quot;
默认插件加载器应在初始化时调用
&quot;&quot;&quot;</span>
<span class="token keyword">for</span> plugin <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">&#39;liteyuki.plugins&#39;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
load_plugin<span class="token punctuation">(</span>plugin<span class="token punctuation">)</span>
<span class="token keyword">for</span> plugin_dir <span class="token keyword">in</span> get_config<span class="token punctuation">(</span><span class="token string">&#39;liteyuki.plugin_dirs&#39;</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token string">&#39;src/liteyuki_plugins&#39;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
load_plugins<span class="token punctuation">(</span>plugin_dir<span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,3),p=[i];function l(o,u){return e(),a("div",null,p)}const r=n(t,[["render",l],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/api/plugins/plugin_loader/","title":"liteyuki.plugins.plugin_loader","lang":"en-US","frontmatter":{"title":"liteyuki.plugins.plugin_loader","description":"func default_plugins_loader() Description: Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/plugins/plugin_loader/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/plugins/plugin_loader/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugins.plugin_loader"}],["meta",{"property":"og:description","content":"func default_plugins_loader() Description: Source code"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.plugin_loader\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"func default_plugins_loader()","slug":"func-default-plugins-loader","link":"#func-default-plugins-loader","children":[]}],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.2,"words":61},"filePathRelative":"en/api/plugins/plugin_loader/index.md","autoDesc":true}');export{r as comp,d as data};

View File

@ -0,0 +1 @@
import{_ as e,o as t,c as a}from"./app-EhCe7g9m.js";const n={};function o(i,r){return t(),a("div")}const p=e(n,[["render",o],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/en/api/message/","title":"liteyuki.message","lang":"en-US","frontmatter":{"title":"liteyuki.message","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/api/message/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/api/message/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":null,"updatedTime":null,"contributors":[]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/api/message/index.md"}');export{p as comp,l as data};

Some files were not shown because too many files have changed in this diff Show More