mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-15 01:34:38 +08:00
Deploying to gh-pages from @ LiteyukiStudio/LiteyukiBot@50c0216435 🚀
This commit is contained in:
parent
0d380cc487
commit
ac94683da0
@ -1 +1 @@
|
|||||||
import{_ as t,o as e,c as o,b as n}from"./app-BrSLFMno.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,b as n}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o,e as r}from"./app-BrSLFMno.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,e as r}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o,e as a}from"./app-BrSLFMno.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,e as a}from"./app-gnbtOU7f.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-gnbtOU7f.js
Normal file
45
assets/app-gnbtOU7f.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
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,e}from"./app-BrSLFMno.js";const t={},p=e(`<h3 id="func-set-channel" tabindex="-1"><a class="header-anchor" href="#func-set-channel"><span><em>func</em> <code>set_channel()</code></span></a></h3><p><strong>说明</strong>: 设置通道实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道名称</li><li>channel: 通道实例</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">set_channel</span><span class="token punctuation">(</span>name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> channel<span class="token punctuation">:</span> <span class="token string">'Channel'</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as a,c as s,e}from"./app-gnbtOU7f.js";const t={},p=e(`<h3 id="func-set-channel" tabindex="-1"><a class="header-anchor" href="#func-set-channel"><span><em>func</em> <code>set_channel()</code></span></a></h3><p><strong>说明</strong>: 设置通道实例</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道名称</li><li>channel: 通道实例</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">set_channel</span><span class="token punctuation">(</span>name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> channel<span class="token punctuation">:</span> <span class="token string">'Channel'</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
设置通道实例
|
设置通道实例
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,e}from"./app-BrSLFMno.js";const t={},p=e(`<h3 id="func-set-channel" tabindex="-1"><a class="header-anchor" href="#func-set-channel"><span><em>func</em> <code>set_channel()</code></span></a></h3><p><strong>Description</strong>: 设置通道实例</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道名称</li><li>channel: 通道实例</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">set_channel</span><span class="token punctuation">(</span>name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> channel<span class="token punctuation">:</span> <span class="token string">'Channel'</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as a,c as s,e}from"./app-gnbtOU7f.js";const t={},p=e(`<h3 id="func-set-channel" tabindex="-1"><a class="header-anchor" href="#func-set-channel"><span><em>func</em> <code>set_channel()</code></span></a></h3><p><strong>Description</strong>: 设置通道实例</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道名称</li><li>channel: 通道实例</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">set_channel</span><span class="token punctuation">(</span>name<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> channel<span class="token punctuation">:</span> <span class="token string">'Channel'</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
设置通道实例
|
设置通道实例
|
||||||
Args:
|
Args:
|
@ -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-BrSLFMno.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,b as n,d as s,a as l,e as p}from"./app-gnbtOU7f.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 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">"/"</span><span class="token punctuation">,</span> <span class="token string">""</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</span>
|
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">"/"</span><span class="token punctuation">,</span> <span class="token string">""</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</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>
|
<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>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as a,o as t,c as o,b as n,d as s,e as p}from"./app-BrSLFMno.js";const e={},i=n("h3",{id:"func-flat-config-dict-str-any",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#func-flat-config-dict-str-any"},[n("span",null,[n("em",null,"func"),s(),n("code",null,"flat_config() -> dict[str, Any]")])])],-1),c=n("p",null,[n("strong",null,"说明"),s(": 扁平化配置文件")],-1),l=n("p",{"a.b.c:1":""},"{a:{b:{c:1}}} ->",-1),u=p(`<p><strong>参数</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><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">flat_config</span><span class="token punctuation">(</span>config<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 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>
|
import{_ as a,o as t,c as o,b as n,d as s,e as p}from"./app-gnbtOU7f.js";const e={},i=n("h3",{id:"func-flat-config-dict-str-any",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#func-flat-config-dict-str-any"},[n("span",null,[n("em",null,"func"),s(),n("code",null,"flat_config() -> dict[str, Any]")])])],-1),c=n("p",null,[n("strong",null,"说明"),s(": 扁平化配置文件")],-1),l=n("p",{"a.b.c:1":""},"{a:{b:{c:1}}} ->",-1),u=p(`<p><strong>参数</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><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">flat_config</span><span class="token punctuation">(</span>config<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 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 triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
扁平化配置文件
|
扁平化配置文件
|
||||||
|
|
@ -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-BrSLFMno.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,b as n,d as s,a as l,e as p}from"./app-gnbtOU7f.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 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">"/"</span><span class="token punctuation">,</span> <span class="token string">""</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</span>
|
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">"/"</span><span class="token punctuation">,</span> <span class="token string">""</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常</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>
|
<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>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as a,o as t,c as o,b as n,d as s,e as p}from"./app-BrSLFMno.js";const e={},i=n("h3",{id:"func-flat-config-dict-str-any",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#func-flat-config-dict-str-any"},[n("span",null,[n("em",null,"func"),s(),n("code",null,"flat_config() -> dict[str, Any]")])])],-1),c=n("p",null,[n("strong",null,"Description"),s(": 扁平化配置文件")],-1),l=n("p",{"a.b.c:1":""},"{a:{b:{c:1}}} ->",-1),u=p(`<p><strong>Arguments</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><p><strong>Return</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">flat_config</span><span class="token punctuation">(</span>config<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 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>
|
import{_ as a,o as t,c as o,b as n,d as s,e as p}from"./app-gnbtOU7f.js";const e={},i=n("h3",{id:"func-flat-config-dict-str-any",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#func-flat-config-dict-str-any"},[n("span",null,[n("em",null,"func"),s(),n("code",null,"flat_config() -> dict[str, Any]")])])],-1),c=n("p",null,[n("strong",null,"Description"),s(": 扁平化配置文件")],-1),l=n("p",{"a.b.c:1":""},"{a:{b:{c:1}}} ->",-1),u=p(`<p><strong>Arguments</strong>:</p><blockquote><ul><li>config: 配置项目</li></ul></blockquote><p><strong>Return</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">flat_config</span><span class="token punctuation">(</span>config<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 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 triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
扁平化配置文件
|
扁平化配置文件
|
||||||
|
|
47
assets/dev_comm.html-Bb1BvdA7.js
Normal file
47
assets/dev_comm.html-Bb1BvdA7.js
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import{_ as e,r as t,o,c as p,b as n,d as s,a as c,e as i}from"./app-gnbtOU7f.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">"nonebot-passive"</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">"nonebot-active"</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">"I am liteyuki main process passive"</span><span class="token punctuation">)</span>
|
||||||
|
channel_active<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">"I am liteyuki main process active"</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"Passive receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">"</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"Active receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">"</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">"key"</span><span class="token punctuation">,</span> <span class="token string">"value"</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">"key"</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 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道Channel用于跨进程通信,你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。 例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息...","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 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道Channel用于跨进程通信,你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。 例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"进程通信\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":6},{"name":"Snowykami","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":2.52,"words":757},"filePathRelative":"dev/dev_comm.md","localizedDate":"2024年8月11日","autoDesc":true}');export{h as comp,b as data};
|
47
assets/dev_comm.html-CocVhTN6.js
Normal file
47
assets/dev_comm.html-CocVhTN6.js
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import{_ as e,r as t,o,c as p,b as n,d as s,a as c,e as i}from"./app-gnbtOU7f.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">"nonebot-passive"</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">"nonebot-active"</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">"I am liteyuki main process passive"</span><span class="token punctuation">)</span>
|
||||||
|
channel_active<span class="token punctuation">.</span>send<span class="token punctuation">(</span><span class="token string">"I am liteyuki main process active"</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"Passive receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">"</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"Active receive: </span><span class="token interpolation"><span class="token punctuation">{</span>data<span class="token punctuation">}</span></span><span class="token string">"</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">"key"</span><span class="token punctuation">,</span> <span class="token string">"value"</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">"key"</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":"/en/dev/dev_comm.html","title":"进程通信","lang":"en-US","frontmatter":{"title":"进程通信","icon":"exchange-alt","order":4,"category":"开发","description":"通道通信 简介 轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道Channel用于跨进程通信,你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。 例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息...","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":"进程通信"}],["meta",{"property":"og:description","content":"通道通信 简介 轻雪运行在主进程 MainProcess 里,其他插件框架进程是伴随的子进程,因此无法通过内存共享和直接对象传递的方式进行通信,轻雪提供了一个通道Channel用于跨进程通信,你可以通过Channel发送消息给其他进程,也可以监听其他进程的消息。 例如子进程接收到用户信息需要重启机器人,这时可以通过通道对主进程发送消息,主进程接收到消息..."}],["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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"进程通信\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":2.52,"words":757},"filePathRelative":"en/dev/dev_comm.md","localizedDate":"August 16, 2024","autoDesc":true}');export{h as comp,b as data};
|
24
assets/dev_lyfunc.html-BJ-C7Gj8.js
Normal file
24
assets/dev_lyfunc.html-BJ-C7Gj8.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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-gnbtOU7f.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"># 在发信器输出"hello world"</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"># 输出"hello world"</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"><</span>var1<span class="token operator">=</span>value<span class="token operator"><span class="token file-descriptor important">1</span>></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"><</span>command<span class="token operator">></span> <span class="token comment"># 在设备上执行命令</span>
|
||||||
|
api <span class="token operator"><</span>api_name<span class="token operator">></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"><</span>func_name<span class="token operator">></span> <span class="token comment"># 调用函数,可递归</span>
|
||||||
|
<span class="token function">sleep</span> <span class="token operator"><</span>time<span class="token operator">></span> <span class="token comment"># 异步等待,单位s</span>
|
||||||
|
<span class="token function">nohup</span> <span class="token operator"><</span>command<span class="token operator">></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>理论上所有基于onebotv11的api都可调用,不同Adapter 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,"但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁")],-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 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.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 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"轻雪函数\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":1.89,"words":566},"filePathRelative":"dev/dev_lyfunc.md","localizedDate":"2024年8月11日","autoDesc":true}');export{w as comp,L as data};
|
24
assets/dev_lyfunc.html-CVeHQ5_4.js
Normal file
24
assets/dev_lyfunc.html-CVeHQ5_4.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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-gnbtOU7f.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"># 在发信器输出"hello world"</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"># 输出"hello world"</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"><</span>var1<span class="token operator">=</span>value<span class="token operator"><span class="token file-descriptor important">1</span>></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"><</span>command<span class="token operator">></span> <span class="token comment"># 在设备上执行命令</span>
|
||||||
|
api <span class="token operator"><</span>api_name<span class="token operator">></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"><</span>func_name<span class="token operator">></span> <span class="token comment"># 调用函数,可递归</span>
|
||||||
|
<span class="token function">sleep</span> <span class="token operator"><</span>time<span class="token operator">></span> <span class="token comment"># 异步等待,单位s</span>
|
||||||
|
<span class="token function">nohup</span> <span class="token operator"><</span>command<span class="token operator">></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>理论上所有基于onebotv11的api都可调用,不同Adapter 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,"但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁")],-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":"轻雪函数","lang":"en-US","frontmatter":{"title":"轻雪函数","icon":"code","order":2,"category":"开发","description":"轻雪函数 轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.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":"轻雪函数"}],["meta",{"property":"og:description","content":"轻雪函数 轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"轻雪函数\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":1.89,"words":566},"filePathRelative":"en/dev/dev_lyfunc.md","localizedDate":"August 16, 2024","autoDesc":true}');export{w as comp,L as data};
|
35
assets/dev_lyplugin.html-B7WwnHH6.js
Normal file
35
assets/dev_lyplugin.html-B7WwnHH6.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.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">"NoneDog"</span><span class="token punctuation">,</span> <span class="token comment"># 插件名称</span>
|
||||||
|
version<span class="token operator">=</span><span class="token string">"1.0.0"</span><span class="token punctuation">,</span> <span class="token comment"># 插件版本</span>
|
||||||
|
description<span class="token operator">=</span><span class="token string">"A simple plugin for nonebot developer"</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">".pyc"</span><span class="token punctuation">,</span> <span class="token string">".pyo"</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">"src/nonebot_plugins"</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">"__pycache__"</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"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..."</span></span><span class="token punctuation">)</span>
|
||||||
|
liteyuki<span class="token punctuation">.</span>restart_process<span class="token punctuation">(</span><span class="token string">"nonebot"</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">"watchdog_plugin"</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":"/en/dev/dev_lyplugin.html","title":"轻雪插件开发","lang":"en-US","frontmatter":{"title":"轻雪插件开发","icon":"laptop-code","order":3,"category":"开发","description":"简介 轻雪插件是轻雪内置的一部分功能,运行在主进程中,可以很高程度地扩展轻雪的功能 开始 创建插件 一个.py文件或一个包含__init__.py的文件夹即可被识别为插件 首先创建一个文件夹,例如watchdog_plugin,并在其中创建一个__init__.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":"轻雪插件开发"}],["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":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"轻雪插件开发\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":1.68,"words":504},"filePathRelative":"en/dev/dev_lyplugin.md","localizedDate":"August 16, 2024","autoDesc":true}');export{d as comp,r as data};
|
35
assets/dev_lyplugin.html-CC1h4TdW.js
Normal file
35
assets/dev_lyplugin.html-CC1h4TdW.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.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">"NoneDog"</span><span class="token punctuation">,</span> <span class="token comment"># 插件名称</span>
|
||||||
|
version<span class="token operator">=</span><span class="token string">"1.0.0"</span><span class="token punctuation">,</span> <span class="token comment"># 插件版本</span>
|
||||||
|
description<span class="token operator">=</span><span class="token string">"A simple plugin for nonebot developer"</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">".pyc"</span><span class="token punctuation">,</span> <span class="token string">".pyo"</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">"src/nonebot_plugins"</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">"__pycache__"</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"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..."</span></span><span class="token punctuation">)</span>
|
||||||
|
liteyuki<span class="token punctuation">.</span>restart_process<span class="token punctuation">(</span><span class="token string">"nonebot"</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">"watchdog_plugin"</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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"轻雪插件开发\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.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":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":6}]},"readingTime":{"minutes":1.68,"words":504},"filePathRelative":"dev/dev_lyplugin.md","localizedDate":"2024年8月11日","autoDesc":true}');export{d as comp,r as data};
|
15
assets/dev_resource_pack.html-DbZ6Vbw3.js
Normal file
15
assets/dev_resource_pack.html-DbZ6Vbw3.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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-gnbtOU7f.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">"资源包名称"</span>
|
||||||
|
<span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">"1.0.0"</span>
|
||||||
|
<span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">"资源包描述"</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>文件,那么加载B包后,A包中的<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>相对路径引用B中的css</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的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。 部分内容制作需要一点点前端基础,例如html,c...","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的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。 部分内容制作需要一点点前端基础,例如html,c..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源包开发\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"简介","slug":"简介","link":"#简介","children":[]},{"level":2,"title":"加载资源包","slug":"加载资源包","link":"#加载资源包","children":[]}],"git":{"createdTime":1723411596000,"updatedTime":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":2.15,"words":644},"filePathRelative":"dev/dev_resource_pack.md","localizedDate":"2024年8月11日","autoDesc":true}');export{x as comp,B as data};
|
15
assets/dev_resource_pack.html-DjH7aIuI.js
Normal file
15
assets/dev_resource_pack.html-DjH7aIuI.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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-gnbtOU7f.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">"资源包名称"</span>
|
||||||
|
<span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">"1.0.0"</span>
|
||||||
|
<span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">"资源包描述"</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>文件,那么加载B包后,A包中的<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>相对路径引用B中的css</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,[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":"/en/dev/dev_resource_pack.html","title":"资源包开发","lang":"en-US","frontmatter":{"title":"资源包开发","icon":"box","order":1,"category":"开发","description":"简介 资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码 提供了一些资源包供你选择,你也可以自己制作资源包 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。 部分内容制作需要一点点前端基础,例如html,c...","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":"资源包开发"}],["meta",{"property":"og:description","content":"简介 资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码 提供了一些资源包供你选择,你也可以自己制作资源包 资源包的制作很简单,如果你接触过Minecraft的资源包,那么你能够很快就上手,仅需按照原有路径进行文件替换即可,讲起打包成一个新的资源包。 部分内容制作需要一点点前端基础,例如html,c..."}],["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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源包开发\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"简介","slug":"简介","link":"#简介","children":[]},{"level":2,"title":"加载资源包","slug":"加载资源包","link":"#加载资源包","children":[]}],"git":{"createdTime":1723829277000,"updatedTime":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":2.15,"words":644},"filePathRelative":"en/dev/dev_resource_pack.md","localizedDate":"August 16, 2024","autoDesc":true}');export{x as comp,B as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,o as n,c as e,e as a}from"./app-BrSLFMno.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">'MessageEvent'</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>
|
import{_ as s,o as n,c as e,e as a}from"./app-gnbtOU7f.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">'MessageEvent'</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">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
轻雪抽象消息事件
|
轻雪抽象消息事件
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,o as n,c as e,e as a}from"./app-BrSLFMno.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">'MessageEvent'</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>
|
import{_ as s,o as n,c as e,e as a}from"./app-gnbtOU7f.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">'MessageEvent'</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">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
轻雪抽象消息事件
|
轻雪抽象消息事件
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as t,c as n,e as a}from"./app-BrSLFMno.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>
|
import{_ as e,o as t,c as n,e as a}from"./app-gnbtOU7f.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>name <span class="token operator">=</span> name
|
||||||
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
|
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/dev/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/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 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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"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":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.12,"words":35},"filePathRelative":"en/dev/api/comm/event.md","localizedDate":"August 21, 2024","autoDesc":true}');export{d as comp,m as 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/dev/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/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 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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"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":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.12,"words":35},"filePathRelative":"en/dev/api/comm/event.md","localizedDate":"August 21, 2024","autoDesc":true}');export{d as comp,m as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,o as e,c as n,e as a}from"./app-BrSLFMno.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>源代码</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>
|
import{_ as t,o as e,c as n,e as a}from"./app-gnbtOU7f.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>源代码</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>name <span class="token operator">=</span> name
|
||||||
self<span class="token punctuation">.</span>data <span class="token operator">=</span> data
|
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 e(),n("div",null,i)}const d=t(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","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/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 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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"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":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.12,"words":36},"filePathRelative":"dev/api/comm/event.md","localizedDate":"2024年8月19日","autoDesc":true}');export{d as comp,m as 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 e(),n("div",null,i)}const d=t(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","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/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 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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm.event\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"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":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.12,"words":36},"filePathRelative":"dev/api/comm/event.md","localizedDate":"2024年8月19日","autoDesc":true}');export{d as comp,m as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,o as i,c as o,b as e,d as n}from"./app-BrSLFMno.js";const a={},c=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=[c];function s(l,r){return i(),o("div",null,p)}const m=t(a,[["render",s],["__file","exception.html.vue"]]),u=JSON.parse('{"path":"/dev/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/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)"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"dev/api/exception.md","localizedDate":"2024年8月19日","autoDesc":true}');export{m as comp,u as data};
|
import{_ as t,o as i,c as o,b as e,d as n}from"./app-gnbtOU7f.js";const a={},c=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=[c];function s(l,r){return i(),o("div",null,p)}const m=t(a,[["render",s],["__file","exception.html.vue"]]),u=JSON.parse('{"path":"/dev/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/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)"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"dev/api/exception.md","localizedDate":"2024年8月19日","autoDesc":true}');export{m as comp,u as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,o as i,c as o,b as e,d as n}from"./app-BrSLFMno.js";const a={},c=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=[c];function s(l,r){return i(),o("div",null,p)}const m=t(a,[["render",s],["__file","exception.html.vue"]]),u=JSON.parse('{"path":"/en/dev/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/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)"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"en/dev/api/exception.md","localizedDate":"August 21, 2024","autoDesc":true}');export{m as comp,u as data};
|
import{_ as t,o as i,c as o,b as e,d as n}from"./app-gnbtOU7f.js";const a={},c=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=[c];function s(l,r){return i(),o("div",null,p)}const m=t(a,[["render",s],["__file","exception.html.vue"]]),u=JSON.parse('{"path":"/en/dev/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/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)"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.exception\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class LiteyukiException(BaseException)","slug":"class-liteyukiexception-baseexception","link":"#class-liteyukiexception-baseexception","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.02,"words":5},"filePathRelative":"en/dev/api/exception.md","localizedDate":"August 21, 2024","autoDesc":true}');export{m as comp,u as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,o as e,c as a,e as n}from"./app-BrSLFMno.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">""</span> <span class="token comment"># 和风天气的天气key,会自动判断key版本</span>
|
import{_ as t,o as e,c as a,e as n}from"./app-gnbtOU7f.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">""</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></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><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>weather <span class="token operator"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># Keywords为城市名,支持中英文</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># Keywords为城市名,支持中英文</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></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"><</span>duration<span class="token operator">></span> <span class="token parameter variable">--period</span> <span class="token operator"><</span>period<span class="token operator">></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>
|
</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"><</span>duration<span class="token operator">></span> <span class="token parameter variable">--period</span> <span class="token operator"><</span>period<span class="token operator">></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>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as t,o as e,c as a,e as n}from"./app-BrSLFMno.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">""</span> <span class="token comment"># 和风天气的天气key,会自动判断key版本</span>
|
import{_ as t,o as e,c as a,e as n}from"./app-gnbtOU7f.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">""</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></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><div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code>weather <span class="token operator"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># Keywords为城市名,支持中英文</span>
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></span> <span class="token comment"># Keywords为城市名,支持中英文</span>
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>查询目标地实时天气,例如:"天气 北京 海淀", "weather Tokyo Shinjuku"</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"><</span>keywords<span class="token punctuation">..</span>.<span class="token operator">></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"><</span>duration<span class="token operator">></span> <span class="token parameter variable">--period</span> <span class="token operator"><</span>period<span class="token operator">></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>
|
</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"><</span>duration<span class="token operator">></span> <span class="token parameter variable">--period</span> <span class="token operator"><</span>period<span class="token operator">></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
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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":"/en/dev/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/dev/api/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/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":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/README.md","localizedDate":"August 21, 2024"}');export{c as comp,l as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.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":"/en/dev/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/dev/api/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/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":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/README.md","localizedDate":"August 21, 2024"}');export{c as comp,l as data};
|
@ -1 +0,0 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.js";const p={};function s(c,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(p,[["render",s],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/dev/","title":"Dev","lang":"zh-CN","frontmatter":{"title":"Dev","article":false,"feed":false,"sitemap":false,"head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"Dev"}],["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\\":\\"Dev\\"}"]]},"headers":[],"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{m as comp,d as data};
|
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as t,e as a}from"./app-BrSLFMno.js";const s={},i=a(`<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>
|
import{_ as n,o as e,c as t,e as a}from"./app-gnbtOU7f.js";const s={},i=a(`<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">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
默认插件加载器,应在初始化时调用
|
默认插件加载器,应在初始化时调用
|
||||||
"""</span>
|
"""</span>
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/comm/README.md","localizedDate":"2024年8月19日"}');export{c as comp,p as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/comm/README.md","localizedDate":"2024年8月19日"}');export{c as comp,p as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as p}from"./app-BrSLFMno.js";const r={};function l(c,i){const e=o("Catalog");return a(),n("div",null,[p(e)])}const s=t(r,[["render",l],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/deploy/","title":"Deploy","lang":"en-US","frontmatter":{"title":"Deploy","index":false,"icon":"laptop-code","category":"deploy","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/deploy/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/deploy/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Deploy"}],["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\\":\\"Deploy\\",\\"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.04,"words":11},"filePathRelative":"en/deploy/README.md","localizedDate":"August 16, 2024"}');export{s as comp,d as data};
|
import{_ as t,r as o,o as a,c as n,a as p}from"./app-gnbtOU7f.js";const r={};function l(c,i){const e=o("Catalog");return a(),n("div",null,[p(e)])}const s=t(r,[["render",l],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/deploy/","title":"Deploy","lang":"en-US","frontmatter":{"title":"Deploy","index":false,"icon":"laptop-code","category":"deploy","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/deploy/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/deploy/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Deploy"}],["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\\":\\"Deploy\\",\\"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.04,"words":11},"filePathRelative":"en/deploy/README.md","localizedDate":"August 16, 2024"}');export{s as comp,d as data};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/README.md","localizedDate":"2024年8月19日"}');export{c as comp,l as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/README.md","localizedDate":"2024年8月19日"}');export{c as comp,l as data};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.js";const a={};function i(n,r){return t(),o("div")}const d=e(a,[["render",i],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/dev/api/dev/","title":"liteyuki.dev","lang":"zh-CN","frontmatter":{"title":"liteyuki.dev","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/dev/README.md","localizedDate":"2024年8月19日"}');export{d as comp,c as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.js";const a={};function i(n,r){return t(),o("div")}const d=e(a,[["render",i],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/dev/api/dev/","title":"liteyuki.dev","lang":"zh-CN","frontmatter":{"title":"liteyuki.dev","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/dev/README.md","localizedDate":"2024年8月19日"}');export{d as comp,c as data};
|
@ -1 +0,0 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.js";const p={};function l(s,c){const e=o("Catalog");return a(),n("div",null,[r(e)])}const m=t(p,[["render",l],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/dev/","title":"Dev","lang":"zh-CN","frontmatter":{"title":"Dev","article":false,"feed":false,"sitemap":false,"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":"Dev"}],["meta",{"property":"og:type","content":"website"}],["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\\":\\"WebPage\\",\\"name\\":\\"Dev\\"}"]]},"headers":[],"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{m as comp,d as data};
|
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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":"兼容nonebot,melobot等,拥有良好的生态支持","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-gnbtOU7f.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":"兼容nonebot,melobot等,拥有良好的生态支持","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};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.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,a as r}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as a}from"./app-BrSLFMno.js";const o={};function i(n,r){return t(),a("div")}const p=e(o,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/en/dev/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/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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/message/README.md","localizedDate":"August 21, 2024"}');export{p as comp,m as data};
|
import{_ as e,o as t,c as a}from"./app-gnbtOU7f.js";const o={};function i(n,r){return t(),a("div")}const p=e(o,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/en/dev/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/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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/message/README.md","localizedDate":"August 21, 2024"}');export{p as comp,m as data};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.js";const r={};function a(i,n){return t(),o("div")}const p=e(r,[["render",a],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/en/dev/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/dev/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/core/README.md","localizedDate":"August 21, 2024"}');export{p as comp,l as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.js";const r={};function a(i,n){return t(),o("div")}const p=e(r,[["render",a],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/en/dev/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/dev/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/core/README.md","localizedDate":"August 21, 2024"}');export{p as comp,l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="func-get-bot-liteyukibot" tabindex="-1"><a class="header-anchor" href="#func-get-bot-liteyukibot"><span><em>func</em> <code>get_bot() -> LiteyukiBot</code></span></a></h3><p><strong>说明</strong>: 获取轻雪实例</p><p><strong>返回</strong>: LiteyukiBot: 当前的轻雪实例</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">get_bot</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> LiteyukiBot<span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="func-get-bot-liteyukibot" tabindex="-1"><a class="header-anchor" href="#func-get-bot-liteyukibot"><span><em>func</em> <code>get_bot() -> LiteyukiBot</code></span></a></h3><p><strong>说明</strong>: 获取轻雪实例</p><p><strong>返回</strong>: LiteyukiBot: 当前的轻雪实例</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">get_bot</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> LiteyukiBot<span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取轻雪实例
|
获取轻雪实例
|
||||||
|
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.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,a as r}from"./app-gnbtOU7f.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};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as t,c as n,e as i}from"./app-BrSLFMno.js";const s={},a=i(`<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() -> 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">></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>
|
import{_ as e,o as t,c as n,e as i}from"./app-gnbtOU7f.js";const s={},a=i(`<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() -> 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">></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">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取已加载的插件
|
获取已加载的插件
|
||||||
Returns:
|
Returns:
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as n,c as r,a}from"./app-BrSLFMno.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};
|
import{_ as t,r as o,o as n,c as r,a}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.js";const i={};function a(s,n){return t(),o("div")}const r=e(i,[["render",a],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/en/","title":"Home","lang":"en-US","frontmatter":{"home":true,"icon":"home","title":"Home","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 A high-performance, easy-to-use chatbot framework and application","actions":[{"text":"Get Started","icon":"rocket","link":"./deploy/install.html","type":"primary"},{"text":"Usage","icon":"book","link":"./usage/basic_command.html"}],"highlights":[{"header":"Simple and Efficient","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":"Multi-Framework Support","icon":"robot","details":"Compatible with nonebot, melobot, etc., with good ecological support","link":"https://nonebot.dev/"},{"title":"Convenient Management","icon":"plug","details":"Use package manager to manage plugins and resource packs"},{"title":"Custom Themes Support","icon":"paint-brush","details":"Fully customize the appearance with resource packs","link":"https://bot.liteyuki.icu/usage/resource_pack.html"},{"title":"i18n","icon":"globe","details":"Support multiple languages through resource packs","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"Easy to Use","icon":"cog","details":"No need for cumbersome pre-processes, ready to use","link":"https://bot.liteyuki.icu/deployment/config.html"},{"title":"High Performance","icon":"tachometer-alt","details":"500 plugins, start within 2s"},{"title":"Rolling Update","icon":"cloud-download","details":"Keep your bot up to date"},{"title":"OpenSource","icon":"code","details":"MIT LICENCE open source project, welcome your contribution"}]},{"header":"Quick Start","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":"Install Git and Python3.10+ environment"},{"title":"Use <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> to clone the project locally"},{"title":"Use <code>cd LiteyukiBot</code> to change the directory to the project root"},{"title":"Use <code>pip install -r requirements.txt</code> install the project dependencies","details":"If you have multiple Python environments, please use <code>pythonx -m pip install -r requirements.txt</code>."},{"title":"Start bot with <code>python main.py</code>."}]}],"copyright":"© 2021-2024 SnowyKami All Rights Reserved","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Home"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T20:50:27.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T20:50:27.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Home\\"}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723841427000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2},{"name":"Snowykami","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":1,"words":300},"filePathRelative":"en/README.md","localizedDate":"August 16, 2024"}');export{r as comp,c as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.js";const i={};function a(s,n){return t(),o("div")}const r=e(i,[["render",a],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/en/","title":"Home","lang":"en-US","frontmatter":{"home":true,"icon":"home","title":"Home","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 A high-performance, easy-to-use chatbot framework and application","actions":[{"text":"Get Started","icon":"rocket","link":"./deploy/install.html","type":"primary"},{"text":"Usage","icon":"book","link":"./usage/basic_command.html"}],"highlights":[{"header":"Simple and Efficient","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":"Multi-Framework Support","icon":"robot","details":"Compatible with nonebot, melobot, etc., with good ecological support","link":"https://nonebot.dev/"},{"title":"Convenient Management","icon":"plug","details":"Use package manager to manage plugins and resource packs"},{"title":"Custom Themes Support","icon":"paint-brush","details":"Fully customize the appearance with resource packs","link":"https://bot.liteyuki.icu/usage/resource_pack.html"},{"title":"i18n","icon":"globe","details":"Support multiple languages through resource packs","link":"https://baike.baidu.com/item/i18n/6771940"},{"title":"Easy to Use","icon":"cog","details":"No need for cumbersome pre-processes, ready to use","link":"https://bot.liteyuki.icu/deployment/config.html"},{"title":"High Performance","icon":"tachometer-alt","details":"500 plugins, start within 2s"},{"title":"Rolling Update","icon":"cloud-download","details":"Keep your bot up to date"},{"title":"OpenSource","icon":"code","details":"MIT LICENCE open source project, welcome your contribution"}]},{"header":"Quick Start","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":"Install Git and Python3.10+ environment"},{"title":"Use <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> to clone the project locally"},{"title":"Use <code>cd LiteyukiBot</code> to change the directory to the project root"},{"title":"Use <code>pip install -r requirements.txt</code> install the project dependencies","details":"If you have multiple Python environments, please use <code>pythonx -m pip install -r requirements.txt</code>."},{"title":"Start bot with <code>python main.py</code>."}]}],"copyright":"© 2021-2024 SnowyKami All Rights Reserved","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Home"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-16T20:50:27.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-16T20:50:27.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Home\\"}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1723841427000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2},{"name":"Snowykami","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":1,"words":300},"filePathRelative":"en/README.md","localizedDate":"August 16, 2024"}');export{r as comp,c as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as n,o,c as a,a as s}from"./app-BrSLFMno.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/dev/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/dev/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};
|
import{_ as t,r as n,o,c as a,a as s}from"./app-gnbtOU7f.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/dev/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/dev/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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.js";const r={};function a(i,n){return t(),o("div")}const p=e(r,[["render",a],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/dev/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/dev/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/core/README.md","localizedDate":"2024年8月19日"}');export{p as comp,l as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.js";const r={};function a(i,n){return t(),o("div")}const p=e(r,[["render",a],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/dev/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/dev/api/core/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/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"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.core\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/core/README.md","localizedDate":"2024年8月19日"}');export{p as comp,l as data};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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":"/en/dev/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/dev/api/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/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":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/dev/README.md","localizedDate":"August 21, 2024"}');export{c as comp,d as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.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":"/en/dev/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/dev/api/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/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":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.dev\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/dev/README.md","localizedDate":"August 21, 2024"}');export{c as comp,d as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.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,a as r}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as o}from"./app-BrSLFMno.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/comm/README.md","localizedDate":"August 21, 2024"}');export{c as comp,p as data};
|
import{_ as e,o as t,c as o}from"./app-gnbtOU7f.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","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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.comm\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/comm/README.md","localizedDate":"August 21, 2024"}');export{c as comp,p as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as t,c as n,e as i}from"./app-BrSLFMno.js";const s={},a=i(`<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() -> dict[str, Plugin]</code></span></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</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">get_loaded_plugins</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</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> Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
import{_ as e,o as t,c as n,e as i}from"./app-gnbtOU7f.js";const s={},a=i(`<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() -> dict[str, Plugin]</code></span></a></h3><p><strong>说明</strong>: 获取已加载的插件</p><p><strong>返回</strong>: dict[str, Plugin]: 插件字典</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">get_loaded_plugins</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</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> Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取已加载的插件
|
获取已加载的插件
|
||||||
Returns:
|
Returns:
|
1
assets/index.html-MLET2Zfm.js
Normal file
1
assets/index.html-MLET2Zfm.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,r as o,o as a,c as n,a as r}from"./app-gnbtOU7f.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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"开发及贡献\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723411596000,"updatedTime":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"dev/README.md","localizedDate":"2024年8月11日"}');export{s as comp,d as data};
|
1
assets/index.html-VU24uxuB.js
Normal file
1
assets/index.html-VU24uxuB.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as t,r as o,o as a,c as n,a as r}from"./app-gnbtOU7f.js";const c={};function p(i,l){const e=o("Catalog");return a(),n("div",null,[r(e)])}const s=t(c,[["render",p],["__file","index.html.vue"]]),d=JSON.parse('{"path":"/en/dev/","title":"开发及贡献","lang":"en-US","frontmatter":{"title":"开发及贡献","index":false,"icon":"laptop-code","category":"开发","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"开发及贡献"}],["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-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"开发及贡献\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1723829277000,"updatedTime":1724912593000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":4}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"en/dev/README.md","localizedDate":"August 16, 2024"}');export{s as comp,d as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as a,e as t}from"./app-BrSLFMno.js";const s={},i=t(`<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>
|
import{_ as n,o as e,c as a,e as t}from"./app-gnbtOU7f.js";const s={},i=t(`<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">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
默认插件加载器,应在初始化时调用
|
默认插件加载器,应在初始化时调用
|
||||||
"""</span>
|
"""</span>
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as a,c as n,a as r}from"./app-BrSLFMno.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,a as r}from"./app-gnbtOU7f.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};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as a}from"./app-BrSLFMno.js";const o={};function i(n,r){return t(),a("div")}const p=e(o,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/dev/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/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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/message/README.md","localizedDate":"2024年8月21日"}');export{p as comp,m as data};
|
import{_ as e,o as t,c as a}from"./app-gnbtOU7f.js";const o={};function i(n,r){return t(),a("div")}const p=e(o,[["render",i],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/dev/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/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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/message/README.md","localizedDate":"2024年8月21日"}');export{p as comp,m as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as n,o as a,c as o,a as p}from"./app-BrSLFMno.js";const l={};function s(r,i){const e=n("Catalog");return a(),o("div",null,[p(e)])}const m=t(l,[["render",s],["__file","index.html.vue"]]),g=JSON.parse('{"path":"/dev/api/plugins/","title":"Plugins","lang":"zh-CN","frontmatter":{"title":"Plugins","article":false,"feed":false,"sitemap":false,"head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/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"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["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};
|
import{_ as t,r as n,o as a,c as o,a as p}from"./app-gnbtOU7f.js";const l={};function s(r,i){const e=n("Catalog");return a(),o("div",null,[p(e)])}const m=t(l,[["render",s],["__file","index.html.vue"]]),g=JSON.parse('{"path":"/dev/api/plugins/","title":"Plugins","lang":"zh-CN","frontmatter":{"title":"Plugins","article":false,"feed":false,"sitemap":false,"head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/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"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["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};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="func-get-bot-liteyukibot" tabindex="-1"><a class="header-anchor" href="#func-get-bot-liteyukibot"><span><em>func</em> <code>get_bot() -> LiteyukiBot</code></span></a></h3><p><strong>Description</strong>: 获取轻雪实例</p><p><strong>Return</strong>: LiteyukiBot: 当前的轻雪实例</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_bot</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> LiteyukiBot<span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="func-get-bot-liteyukibot" tabindex="-1"><a class="header-anchor" href="#func-get-bot-liteyukibot"><span><em>func</em> <code>get_bot() -> LiteyukiBot</code></span></a></h3><p><strong>Description</strong>: 获取轻雪实例</p><p><strong>Return</strong>: LiteyukiBot: 当前的轻雪实例</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_bot</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> LiteyukiBot<span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取轻雪实例
|
获取轻雪实例
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,r as a,o as l,c as r,b as e,d as t,a as o,e as i}from"./app-BrSLFMno.js";const c={},d=e("h2",{id:"installation",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installation"},[e("span",null,[e("strong",null,"Installation")])])],-1),p=e("h3",{id:"conventional-deployment",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#conventional-deployment"},[e("span",null,[e("strong",null,"Conventional deployment")])])],-1),u={href:"https://git-scm.com/download/",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"Git",-1),m={href:"https://www.python.org/downloads/release/python-31010/",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"Python3.10+",-1),y=i(`<div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># Clone the project locally, --depth=1 to reduce the size of the cloned repository, this project updates depend on Git</span>
|
import{_ as s,r as a,o as l,c as r,b as e,d as t,a as o,e as i}from"./app-gnbtOU7f.js";const c={},d=e("h2",{id:"installation",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installation"},[e("span",null,[e("strong",null,"Installation")])])],-1),p=e("h3",{id:"conventional-deployment",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#conventional-deployment"},[e("span",null,[e("strong",null,"Conventional deployment")])])],-1),u={href:"https://git-scm.com/download/",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"Git",-1),m={href:"https://www.python.org/downloads/release/python-31010/",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"Python3.10+",-1),y=i(`<div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># Clone the project locally, --depth=1 to reduce the size of the cloned repository, this project updates depend on Git</span>
|
||||||
<span class="token function">git</span> clone https://github.com/LiteyukiStudio/LiteyukiBot <span class="token parameter variable">--depth</span><span class="token operator">=</span><span class="token number">1</span>
|
<span class="token function">git</span> clone https://github.com/LiteyukiStudio/LiteyukiBot <span class="token parameter variable">--depth</span><span class="token operator">=</span><span class="token number">1</span>
|
||||||
<span class="token comment"># change the directory to the project root</span>
|
<span class="token comment"># change the directory to the project root</span>
|
||||||
<span class="token builtin class-name">cd</span> LiteyukiBot
|
<span class="token builtin class-name">cd</span> LiteyukiBot
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as s,r as a,o as l,c,b as e,d as t,a as o,e as i}from"./app-BrSLFMno.js";const r={},d=e("h2",{id:"开始安装",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#开始安装"},[e("span",null,[e("strong",null,"开始安装")])])],-1),p=e("h3",{id:"常规部署",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#常规部署"},[e("span",null,[e("strong",null,"常规部署")])])],-1),h={href:"https://git-scm.com/download/",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"Git",-1),m={href:"https://www.python.org/downloads/release/python-31010/",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"Python3.10+",-1),_=i(`<div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项</span>
|
import{_ as s,r as a,o as l,c,b as e,d as t,a as o,e as i}from"./app-gnbtOU7f.js";const r={},d=e("h2",{id:"开始安装",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#开始安装"},[e("span",null,[e("strong",null,"开始安装")])])],-1),p=e("h3",{id:"常规部署",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#常规部署"},[e("span",null,[e("strong",null,"常规部署")])])],-1),h={href:"https://git-scm.com/download/",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"Git",-1),m={href:"https://www.python.org/downloads/release/python-31010/",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"Python3.10+",-1),_=i(`<div class="language-bash line-numbers-mode" data-ext="sh" data-title="sh"><pre class="language-bash"><code><span class="token comment"># 克隆项目到本地,轻雪使用Git进行版本管理,该步骤为必要项</span>
|
||||||
<span class="token function">git</span> clone https://github.com/LiteyukiStudio/LiteyukiBot <span class="token parameter variable">--depth</span><span class="token operator">=</span><span class="token number">1</span>
|
<span class="token function">git</span> clone https://github.com/LiteyukiStudio/LiteyukiBot <span class="token parameter variable">--depth</span><span class="token operator">=</span><span class="token number">1</span>
|
||||||
<span class="token comment"># 切换到Bot目录下</span>
|
<span class="token comment"># 切换到Bot目录下</span>
|
||||||
<span class="token builtin class-name">cd</span> LiteyukiBot
|
<span class="token builtin class-name">cd</span> LiteyukiBot
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="class-lifespan" tabindex="-1"><a class="header-anchor" href="#class-lifespan"><span><strong>class</strong> <code>Lifespan</code></span></a></h3><h3 id="method-init-self-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-none"><span><em>method</em> <code>__init__(self) -> 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> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="class-lifespan" tabindex="-1"><a class="header-anchor" href="#class-lifespan"><span><strong>class</strong> <code>Lifespan</code></span></a></h3><h3 id="method-init-self-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-none"><span><em>method</em> <code>__init__(self) -> 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> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
轻雪生命周期管理,启动、停止、重启
|
轻雪生命周期管理,启动、停止、重启
|
||||||
"""</span>
|
"""</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="class-lifespan" tabindex="-1"><a class="header-anchor" href="#class-lifespan"><span><strong>class</strong> <code>Lifespan</code></span></a></h3><h3 id="method-init-self-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-none"><span><em>method</em> <code>__init__(self) -> 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> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="class-lifespan" tabindex="-1"><a class="header-anchor" href="#class-lifespan"><span><strong>class</strong> <code>Lifespan</code></span></a></h3><h3 id="method-init-self-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-none"><span><em>method</em> <code>__init__(self) -> 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> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
轻雪生命周期管理,启动、停止、重启
|
轻雪生命周期管理,启动、停止、重启
|
||||||
"""</span>
|
"""</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as t,e as s}from"./app-BrSLFMno.js";const a={},o=s(`<h3 id="on-startswith-liteecho-rule-is-su-rule-handle" tabindex="-1"><a class="header-anchor" href="#on-startswith-liteecho-rule-is-su-rule-handle"><span><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></span></a></h3><h3 id="async-func-liteecho" tabindex="-1"><a class="header-anchor" href="#async-func-liteecho"><span><em>async func</em> <code>liteecho()</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 decorator annotation punctuation">@on_startswith</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'liteecho'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> rule<span class="token operator">=</span>is_su_rule<span class="token punctuation">)</span><span class="token punctuation">.</span>handle<span class="token punctuation">(</span><span class="token punctuation">)</span>
|
import{_ as e,o as n,c as t,e as s}from"./app-gnbtOU7f.js";const a={},o=s(`<h3 id="on-startswith-liteecho-rule-is-su-rule-handle" tabindex="-1"><a class="header-anchor" href="#on-startswith-liteecho-rule-is-su-rule-handle"><span><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></span></a></h3><h3 id="async-func-liteecho" tabindex="-1"><a class="header-anchor" href="#async-func-liteecho"><span><em>async func</em> <code>liteecho()</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 decorator annotation punctuation">@on_startswith</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'liteecho'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> rule<span class="token operator">=</span>is_su_rule<span class="token punctuation">)</span><span class="token punctuation">.</span>handle<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">liteecho</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<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">liteecho</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
event<span class="token punctuation">.</span>reply<span class="token punctuation">(</span>event<span class="token punctuation">.</span>raw_message<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">8</span><span class="token punctuation">:</span><span class="token punctuation">]</span><span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
event<span class="token punctuation">.</span>reply<span class="token punctuation">(</span>event<span class="token punctuation">.</span>raw_message<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">8</span><span class="token punctuation">:</span><span class="token punctuation">]</span><span class="token punctuation">.</span>strip<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></div></details>`,3),c=[o];function i(l,p){return n(),t("div",null,c)}const r=e(a,[["render",i],["__file","liteecho.html.vue"]]),h=JSON.parse(`{"path":"/en/dev/api/plugins/liteecho.html","title":"liteyuki.plugins.liteecho","lang":"en-US","frontmatter":{"title":"liteyuki.plugins.liteecho","description":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugins.liteecho"}],["meta",{"property":"og:description","content":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() Source code"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.liteecho\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"@on_startswith(['liteecho'], rule=is_su_rule).handle()","slug":"on-startswith-liteecho-rule-is-su-rule-handle","link":"#on-startswith-liteecho-rule-is-su-rule-handle","children":[]},{"level":3,"title":"async func liteecho()","slug":"async-func-liteecho","link":"#async-func-liteecho","children":[]}],"git":{"createdTime":1724912379000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.11,"words":33},"filePathRelative":"en/dev/api/plugins/liteecho.md","localizedDate":"August 29, 2024","autoDesc":true}`);export{r as comp,h as 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),c=[o];function i(l,p){return n(),t("div",null,c)}const r=e(a,[["render",i],["__file","liteecho.html.vue"]]),h=JSON.parse(`{"path":"/en/dev/api/plugins/liteecho.html","title":"liteyuki.plugins.liteecho","lang":"en-US","frontmatter":{"title":"liteyuki.plugins.liteecho","description":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugins.liteecho"}],["meta",{"property":"og:description","content":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() Source code"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.liteecho\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"@on_startswith(['liteecho'], rule=is_su_rule).handle()","slug":"on-startswith-liteecho-rule-is-su-rule-handle","link":"#on-startswith-liteecho-rule-is-su-rule-handle","children":[]},{"level":3,"title":"async func liteecho()","slug":"async-func-liteecho","link":"#async-func-liteecho","children":[]}],"git":{"createdTime":1724912379000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.11,"words":33},"filePathRelative":"en/dev/api/plugins/liteecho.md","localizedDate":"August 29, 2024","autoDesc":true}`);export{r as comp,h as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as t,e as s}from"./app-BrSLFMno.js";const a={},o=s(`<h3 id="on-startswith-liteecho-rule-is-su-rule-handle" tabindex="-1"><a class="header-anchor" href="#on-startswith-liteecho-rule-is-su-rule-handle"><span><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></span></a></h3><h3 id="async-func-liteecho" tabindex="-1"><a class="header-anchor" href="#async-func-liteecho"><span><em>async func</em> <code>liteecho()</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 decorator annotation punctuation">@on_startswith</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'liteecho'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> rule<span class="token operator">=</span>is_su_rule<span class="token punctuation">)</span><span class="token punctuation">.</span>handle<span class="token punctuation">(</span><span class="token punctuation">)</span>
|
import{_ as e,o as n,c as t,e as s}from"./app-gnbtOU7f.js";const a={},o=s(`<h3 id="on-startswith-liteecho-rule-is-su-rule-handle" tabindex="-1"><a class="header-anchor" href="#on-startswith-liteecho-rule-is-su-rule-handle"><span><code>@on_startswith(['liteecho'], rule=is_su_rule).handle()</code></span></a></h3><h3 id="async-func-liteecho" tabindex="-1"><a class="header-anchor" href="#async-func-liteecho"><span><em>async func</em> <code>liteecho()</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 decorator annotation punctuation">@on_startswith</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'liteecho'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> rule<span class="token operator">=</span>is_su_rule<span class="token punctuation">)</span><span class="token punctuation">.</span>handle<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">liteecho</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<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">liteecho</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
event<span class="token punctuation">.</span>reply<span class="token punctuation">(</span>event<span class="token punctuation">.</span>raw_message<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">8</span><span class="token punctuation">:</span><span class="token punctuation">]</span><span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
event<span class="token punctuation">.</span>reply<span class="token punctuation">(</span>event<span class="token punctuation">.</span>raw_message<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">8</span><span class="token punctuation">:</span><span class="token punctuation">]</span><span class="token punctuation">.</span>strip<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></div></details>`,3),i=[o];function c(l,p){return n(),t("div",null,i)}const r=e(a,[["render",c],["__file","liteecho.html.vue"]]),h=JSON.parse(`{"path":"/dev/api/plugins/liteecho.html","title":"liteyuki.plugins.liteecho","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugins.liteecho","description":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() 源代码","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugins.liteecho"}],["meta",{"property":"og:description","content":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() 源代码"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.liteecho\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"@on_startswith(['liteecho'], rule=is_su_rule).handle()","slug":"on-startswith-liteecho-rule-is-su-rule-handle","link":"#on-startswith-liteecho-rule-is-su-rule-handle","children":[]},{"level":3,"title":"async func liteecho()","slug":"async-func-liteecho","link":"#async-func-liteecho","children":[]}],"git":{"createdTime":1724912379000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.11,"words":34},"filePathRelative":"dev/api/plugins/liteecho.md","localizedDate":"2024年8月29日","autoDesc":true}`);export{r as comp,h as 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 n(),t("div",null,i)}const r=e(a,[["render",c],["__file","liteecho.html.vue"]]),h=JSON.parse(`{"path":"/dev/api/plugins/liteecho.html","title":"liteyuki.plugins.liteecho","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugins.liteecho","description":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() 源代码","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugins/liteecho.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugins.liteecho"}],["meta",{"property":"og:description","content":"@on_startswith(['liteecho'], rule=is_su_rule).handle() async func liteecho() 源代码"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugins.liteecho\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"@on_startswith(['liteecho'], rule=is_su_rule).handle()","slug":"on-startswith-liteecho-rule-is-su-rule-handle","link":"#on-startswith-liteecho-rule-is-su-rule-handle","children":[]},{"level":3,"title":"async func liteecho()","slug":"async-func-liteecho","link":"#async-func-liteecho","children":[]}],"git":{"createdTime":1724912379000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.11,"words":34},"filePathRelative":"dev/api/plugins/liteecho.md","localizedDate":"2024年8月29日","autoDesc":true}`);export{r as comp,h as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as o,o as e,c as l,b as a,d as n,a as i,w as c,e as s}from"./app-BrSLFMno.js";const u={},r=s(`<h3 id="func-load-plugin-optional-plugin" tabindex="-1"><a class="header-anchor" href="#func-load-plugin-optional-plugin"><span><em>func</em> <code>load_plugin() -> Optional[Plugin]</code></span></a></h3><p><strong>说明</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>源代码</b></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">load_plugin</span><span class="token punctuation">(</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Optional<span class="token punctuation">[</span>Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
import{_ as p,r as o,o as e,c as l,b as a,d as n,a as i,w as c,e as s}from"./app-gnbtOU7f.js";const u={},r=s(`<h3 id="func-load-plugin-optional-plugin" tabindex="-1"><a class="header-anchor" href="#func-load-plugin-optional-plugin"><span><em>func</em> <code>load_plugin() -> Optional[Plugin]</code></span></a></h3><p><strong>说明</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>源代码</b></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">load_plugin</span><span class="token punctuation">(</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Optional<span class="token punctuation">[</span>Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
|
<span class="token triple-quoted-string string">"""加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
|
||||||
|
|
||||||
参数:
|
参数:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as p,r as o,o as e,c as l,b as a,d as n,a as i,w as c,e as s}from"./app-BrSLFMno.js";const u={},r=s(`<h3 id="func-load-plugin-optional-plugin" tabindex="-1"><a class="header-anchor" href="#func-load-plugin-optional-plugin"><span><em>func</em> <code>load_plugin() -> Optional[Plugin]</code></span></a></h3><p><strong>Description</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>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">load_plugin</span><span class="token punctuation">(</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Optional<span class="token punctuation">[</span>Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
import{_ as p,r as o,o as e,c as l,b as a,d as n,a as i,w as c,e as s}from"./app-gnbtOU7f.js";const u={},r=s(`<h3 id="func-load-plugin-optional-plugin" tabindex="-1"><a class="header-anchor" href="#func-load-plugin-optional-plugin"><span><em>func</em> <code>load_plugin() -> Optional[Plugin]</code></span></a></h3><p><strong>Description</strong>: 加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>module_path: 插件名称 <code>path.to.your.plugin</code></li><li>或插件路径 <code>pathlib.Path(path/to/your/plugin)</code>:</li></ul></blockquote><details><summary><b>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">load_plugin</span><span class="token punctuation">(</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Optional<span class="token punctuation">[</span>Plugin<span class="token punctuation">]</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
|
<span class="token triple-quoted-string string">"""加载单个插件,可以是本地插件或是通过 \`pip\` 安装的插件。
|
||||||
|
|
||||||
参数:
|
参数:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e as t}from"./app-BrSLFMno.js";const e={},o=t(`<h3 id="func-get-format-str" tabindex="-1"><a class="header-anchor" href="#func-get-format-str"><span><em>func</em> <code>get_format() -> str</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">get_format</span><span class="token punctuation">(</span>level<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e as t}from"./app-gnbtOU7f.js";const e={},o=t(`<h3 id="func-get-format-str" tabindex="-1"><a class="header-anchor" href="#func-get-format-str"><span><em>func</em> <code>get_format() -> str</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">get_format</span><span class="token punctuation">(</span>level<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">if</span> level <span class="token operator">==</span> <span class="token string">'DEBUG'</span><span class="token punctuation">:</span>
|
<span class="token keyword">if</span> level <span class="token operator">==</span> <span class="token string">'DEBUG'</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> debug_format
|
<span class="token keyword">return</span> debug_format
|
||||||
<span class="token keyword">else</span><span class="token punctuation">:</span>
|
<span class="token keyword">else</span><span class="token punctuation">:</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e as t}from"./app-BrSLFMno.js";const e={},o=t(`<h3 id="func-get-format-str" tabindex="-1"><a class="header-anchor" href="#func-get-format-str"><span><em>func</em> <code>get_format() -> str</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">get_format</span><span class="token punctuation">(</span>level<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e as t}from"./app-gnbtOU7f.js";const e={},o=t(`<h3 id="func-get-format-str" tabindex="-1"><a class="header-anchor" href="#func-get-format-str"><span><em>func</em> <code>get_format() -> str</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">get_format</span><span class="token punctuation">(</span>level<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">if</span> level <span class="token operator">==</span> <span class="token string">'DEBUG'</span><span class="token punctuation">:</span>
|
<span class="token keyword">if</span> level <span class="token operator">==</span> <span class="token string">'DEBUG'</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> debug_format
|
<span class="token keyword">return</span> debug_format
|
||||||
<span class="token keyword">else</span><span class="token punctuation">:</span>
|
<span class="token keyword">else</span><span class="token punctuation">:</span>
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as a}from"./app-BrSLFMno.js";const n={};function o(i,r){return t(),a("div")}const m=e(n,[["render",o],["__file","manager.html.vue"]]),l=JSON.parse('{"path":"/en/dev/api/plugin/manager.html","title":"liteyuki.plugin.manager","lang":"en-US","frontmatter":{"title":"liteyuki.plugin.manager","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/manager.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/manager.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugin.manager"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.manager\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/plugin/manager.md","localizedDate":"August 21, 2024"}');export{m as comp,l as data};
|
import{_ as e,o as t,c as a}from"./app-gnbtOU7f.js";const n={};function o(i,r){return t(),a("div")}const m=e(n,[["render",o],["__file","manager.html.vue"]]),l=JSON.parse('{"path":"/en/dev/api/plugin/manager.html","title":"liteyuki.plugin.manager","lang":"en-US","frontmatter":{"title":"liteyuki.plugin.manager","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/manager.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/manager.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugin.manager"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.manager\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/plugin/manager.md","localizedDate":"August 21, 2024"}');export{m as comp,l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},p=e(`<h3 id="class-channeldeliver" tabindex="-1"><a class="header-anchor" href="#class-channeldeliver"><span><strong>class</strong> <code>ChannelDeliver</code></span></a></h3><h3 id="method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any"><span><em>method</em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code></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> active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> <span class="token builtin">dict</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> publish<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</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 punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},p=e(`<h3 id="class-channeldeliver" tabindex="-1"><a class="header-anchor" href="#class-channeldeliver"><span><strong>class</strong> <code>ChannelDeliver</code></span></a></h3><h3 id="method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any"><span><em>method</em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code></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> active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> <span class="token builtin">dict</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> publish<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</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 punctuation">:</span>
|
||||||
self<span class="token punctuation">.</span>active <span class="token operator">=</span> active
|
self<span class="token punctuation">.</span>active <span class="token operator">=</span> active
|
||||||
self<span class="token punctuation">.</span>passive <span class="token operator">=</span> passive
|
self<span class="token punctuation">.</span>passive <span class="token operator">=</span> passive
|
||||||
self<span class="token punctuation">.</span>channel_deliver_active <span class="token operator">=</span> channel_deliver_active
|
self<span class="token punctuation">.</span>channel_deliver_active <span class="token operator">=</span> channel_deliver_active
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as a}from"./app-BrSLFMno.js";const n={};function o(i,r){return t(),a("div")}const m=e(n,[["render",o],["__file","manager.html.vue"]]),l=JSON.parse('{"path":"/dev/api/plugin/manager.html","title":"liteyuki.plugin.manager","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin.manager","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/manager.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/manager.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugin.manager"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.manager\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/plugin/manager.md","localizedDate":"2024年8月19日"}');export{m as comp,l as data};
|
import{_ as e,o as t,c as a}from"./app-gnbtOU7f.js";const n={};function o(i,r){return t(),a("div")}const m=e(n,[["render",o],["__file","manager.html.vue"]]),l=JSON.parse('{"path":"/dev/api/plugin/manager.html","title":"liteyuki.plugin.manager","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin.manager","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/manager.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/manager.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugin.manager"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.manager\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/plugin/manager.md","localizedDate":"2024年8月19日"}');export{m as comp,l as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e}from"./app-BrSLFMno.js";const t={},p=e(`<h3 id="class-channeldeliver" tabindex="-1"><a class="header-anchor" href="#class-channeldeliver"><span><strong>class</strong> <code>ChannelDeliver</code></span></a></h3><h3 id="method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any"><span><em>method</em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code></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> active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> <span class="token builtin">dict</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> publish<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</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 punctuation">:</span>
|
import{_ as n,o as s,c as a,e}from"./app-gnbtOU7f.js";const t={},p=e(`<h3 id="class-channeldeliver" tabindex="-1"><a class="header-anchor" href="#class-channeldeliver"><span><strong>class</strong> <code>ChannelDeliver</code></span></a></h3><h3 id="method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any" tabindex="-1"><a class="header-anchor" href="#method-init-self-active-channel-any-passive-channel-any-channel-deliver-active-channel-channel-any-channel-deliver-passive-channel-tuple-str-dict-publish-channel-tuple-str-any"><span><em>method</em> <code>__init__(self, active: Channel[Any], passive: Channel[Any], channel_deliver_active: Channel[Channel[Any]], channel_deliver_passive: Channel[tuple[str, dict]], publish: Channel[tuple[str, Any]])</code></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> active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_active<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span>Channel<span class="token punctuation">[</span>Any<span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> channel_deliver_passive<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</span><span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">,</span> <span class="token builtin">dict</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> publish<span class="token punctuation">:</span> Channel<span class="token punctuation">[</span><span class="token builtin">tuple</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 punctuation">:</span>
|
||||||
self<span class="token punctuation">.</span>active <span class="token operator">=</span> active
|
self<span class="token punctuation">.</span>active <span class="token operator">=</span> active
|
||||||
self<span class="token punctuation">.</span>passive <span class="token operator">=</span> passive
|
self<span class="token punctuation">.</span>passive <span class="token operator">=</span> passive
|
||||||
self<span class="token punctuation">.</span>channel_deliver_active <span class="token operator">=</span> channel_deliver_active
|
self<span class="token punctuation">.</span>channel_deliver_active <span class="token operator">=</span> channel_deliver_active
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as s,e as a}from"./app-BrSLFMno.js";const t={},l=a(`<h3 id="class-matcher" tabindex="-1"><a class="header-anchor" href="#class-matcher"><span><strong>class</strong> <code>Matcher</code></span></a></h3><h3 id="method-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><a class="header-anchor" href="#method-init-self-rule-rule-priority-int-block-bool"><span><em>method</em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code></span></a></h3><p><strong>Description</strong>: 匹配器</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</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">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> rule<span class="token punctuation">:</span> Rule<span class="token punctuation">,</span> priority<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span> block<span class="token punctuation">:</span> <span class="token builtin">bool</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as e,c as s,e as a}from"./app-gnbtOU7f.js";const t={},l=a(`<h3 id="class-matcher" tabindex="-1"><a class="header-anchor" href="#class-matcher"><span><strong>class</strong> <code>Matcher</code></span></a></h3><h3 id="method-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><a class="header-anchor" href="#method-init-self-rule-rule-priority-int-block-bool"><span><em>method</em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code></span></a></h3><p><strong>Description</strong>: 匹配器</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</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">__init__</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> rule<span class="token punctuation">:</span> Rule<span class="token punctuation">,</span> priority<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span> block<span class="token punctuation">:</span> <span class="token builtin">bool</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
匹配器
|
匹配器
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as a,e as s}from"./app-BrSLFMno.js";const t={},l=s(`<h3 id="class-matcher" tabindex="-1"><a class="header-anchor" href="#class-matcher"><span><strong>class</strong> <code>Matcher</code></span></a></h3><h3 id="method-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><a class="header-anchor" href="#method-init-self-rule-rule-priority-int-block-bool"><span><em>method</em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code></span></a></h3><p><strong>说明</strong>: 匹配器</p><p><strong>参数</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</li></ul></blockquote><details><summary><b>源代码</b></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> rule<span class="token punctuation">:</span> Rule<span class="token punctuation">,</span> priority<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span> block<span class="token punctuation">:</span> <span class="token builtin">bool</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as e,c as a,e as s}from"./app-gnbtOU7f.js";const t={},l=s(`<h3 id="class-matcher" tabindex="-1"><a class="header-anchor" href="#class-matcher"><span><strong>class</strong> <code>Matcher</code></span></a></h3><h3 id="method-init-self-rule-rule-priority-int-block-bool" tabindex="-1"><a class="header-anchor" href="#method-init-self-rule-rule-priority-int-block-bool"><span><em>method</em> <code>__init__(self, rule: Rule, priority: int, block: bool)</code></span></a></h3><p><strong>说明</strong>: 匹配器</p><p><strong>参数</strong>:</p><blockquote><ul><li>rule: 规则</li><li>priority: 优先级 >= 0</li><li>block: 是否阻断后续优先级更低的匹配器</li></ul></blockquote><details><summary><b>源代码</b></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> rule<span class="token punctuation">:</span> Rule<span class="token punctuation">,</span> priority<span class="token punctuation">:</span> <span class="token builtin">int</span><span class="token punctuation">,</span> block<span class="token punctuation">:</span> <span class="token builtin">bool</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
匹配器
|
匹配器
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e as t}from"./app-BrSLFMno.js";const p={},o=t(`<h3 id="func-get-relative-path-str" tabindex="-1"><a class="header-anchor" href="#func-get-relative-path-str"><span><em>func</em> <code>get_relative_path() -> str</code></span></a></h3><p><strong>Description</strong>: 获取相对路径</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>base_path: 基础路径</li><li>target_path: 目标路径</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">get_relative_path</span><span class="token punctuation">(</span>base_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> target_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e as t}from"./app-gnbtOU7f.js";const p={},o=t(`<h3 id="func-get-relative-path-str" tabindex="-1"><a class="header-anchor" href="#func-get-relative-path-str"><span><em>func</em> <code>get_relative_path() -> str</code></span></a></h3><p><strong>Description</strong>: 获取相对路径</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>base_path: 基础路径</li><li>target_path: 目标路径</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">get_relative_path</span><span class="token punctuation">(</span>base_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> target_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取相对路径
|
获取相对路径
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as s,c as a,e as t}from"./app-BrSLFMno.js";const p={},o=t(`<h3 id="func-get-relative-path-str" tabindex="-1"><a class="header-anchor" href="#func-get-relative-path-str"><span><em>func</em> <code>get_relative_path() -> str</code></span></a></h3><p><strong>说明</strong>: 获取相对路径</p><p><strong>参数</strong>:</p><blockquote><ul><li>base_path: 基础路径</li><li>target_path: 目标路径</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">get_relative_path</span><span class="token punctuation">(</span>base_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> target_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
import{_ as n,o as s,c as a,e as t}from"./app-gnbtOU7f.js";const p={},o=t(`<h3 id="func-get-relative-path-str" tabindex="-1"><a class="header-anchor" href="#func-get-relative-path-str"><span><em>func</em> <code>get_relative_path() -> str</code></span></a></h3><p><strong>说明</strong>: 获取相对路径</p><p><strong>参数</strong>:</p><blockquote><ul><li>base_path: 基础路径</li><li>target_path: 目标路径</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">get_relative_path</span><span class="token punctuation">(</span>base_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span> target_path<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">str</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
获取相对路径
|
获取相对路径
|
||||||
Args:
|
Args:
|
@ -1,3 +1,3 @@
|
|||||||
import{_ as e,o as a,c as s,e as t}from"./app-BrSLFMno.js";const l={},n=t(`<h3 id="class-plugintype-enum" tabindex="-1"><a class="header-anchor" href="#class-plugintype-enum"><span><strong>class</strong> <code>PluginType(Enum)</code></span></a></h3><h3 id="class-pluginmetadata-basemodel" tabindex="-1"><a class="header-anchor" href="#class-pluginmetadata-basemodel"><span><strong>class</strong> <code>PluginMetadata(BaseModel)</code></span></a></h3><h3 id="class-plugin-basemodel" tabindex="-1"><a class="header-anchor" href="#class-plugin-basemodel"><span><strong>class</strong> <code>Plugin(BaseModel)</code></span></a></h3><h3 id="method-hash-self" tabindex="-1"><a class="header-anchor" href="#method-hash-self"><span><em>method</em> <code>__hash__(self)</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">__hash__</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as e,o as a,c as s,e as t}from"./app-gnbtOU7f.js";const l={},n=t(`<h3 id="class-plugintype-enum" tabindex="-1"><a class="header-anchor" href="#class-plugintype-enum"><span><strong>class</strong> <code>PluginType(Enum)</code></span></a></h3><h3 id="class-pluginmetadata-basemodel" tabindex="-1"><a class="header-anchor" href="#class-pluginmetadata-basemodel"><span><strong>class</strong> <code>PluginMetadata(BaseModel)</code></span></a></h3><h3 id="class-plugin-basemodel" tabindex="-1"><a class="header-anchor" href="#class-plugin-basemodel"><span><strong>class</strong> <code>Plugin(BaseModel)</code></span></a></h3><h3 id="method-hash-self" tabindex="-1"><a class="header-anchor" href="#method-hash-self"><span><em>method</em> <code>__hash__(self)</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">__hash__</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> <span class="token builtin">hash</span><span class="token punctuation">(</span>self<span class="token punctuation">.</span>module_name<span class="token punctuation">)</span>
|
<span class="token keyword">return</span> <span class="token builtin">hash</span><span class="token punctuation">(</span>self<span class="token punctuation">.</span>module_name<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></div></details>`,5),o=[n];function i(d,p){return a(),s("div",null,o)}const m=e(l,[["render",i],["__file","model.html.vue"]]),r=JSON.parse('{"path":"/dev/api/plugin/model.html","title":"liteyuki.plugin.model","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin.model","description":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) 源代码","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/model.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/model.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugin.model"}],["meta",{"property":"og:description","content":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) 源代码"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.model\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class PluginType(Enum)","slug":"class-plugintype-enum","link":"#class-plugintype-enum","children":[]},{"level":3,"title":"class PluginMetadata(BaseModel)","slug":"class-pluginmetadata-basemodel","link":"#class-pluginmetadata-basemodel","children":[]},{"level":3,"title":"class Plugin(BaseModel)","slug":"class-plugin-basemodel","link":"#class-plugin-basemodel","children":[]},{"level":3,"title":"method __hash__(self)","slug":"method-hash-self","link":"#method-hash-self","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":5}]},"readingTime":{"minutes":0.1,"words":30},"filePathRelative":"dev/api/plugin/model.md","localizedDate":"2024年8月19日","autoDesc":true}');export{m as comp,r as data};
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div></details>`,5),o=[n];function i(d,p){return a(),s("div",null,o)}const m=e(l,[["render",i],["__file","model.html.vue"]]),r=JSON.parse('{"path":"/dev/api/plugin/model.html","title":"liteyuki.plugin.model","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin.model","description":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) 源代码","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/model.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/model.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.plugin.model"}],["meta",{"property":"og:description","content":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) 源代码"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.model\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class PluginType(Enum)","slug":"class-plugintype-enum","link":"#class-plugintype-enum","children":[]},{"level":3,"title":"class PluginMetadata(BaseModel)","slug":"class-pluginmetadata-basemodel","link":"#class-pluginmetadata-basemodel","children":[]},{"level":3,"title":"class Plugin(BaseModel)","slug":"class-plugin-basemodel","link":"#class-plugin-basemodel","children":[]},{"level":3,"title":"method __hash__(self)","slug":"method-hash-self","link":"#method-hash-self","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":5}]},"readingTime":{"minutes":0.1,"words":30},"filePathRelative":"dev/api/plugin/model.md","localizedDate":"2024年8月19日","autoDesc":true}');export{m as comp,r as data};
|
@ -1,3 +1,3 @@
|
|||||||
import{_ as e,o as a,c as s,e as t}from"./app-BrSLFMno.js";const n={},l=t(`<h3 id="class-plugintype-enum" tabindex="-1"><a class="header-anchor" href="#class-plugintype-enum"><span><strong>class</strong> <code>PluginType(Enum)</code></span></a></h3><h3 id="class-pluginmetadata-basemodel" tabindex="-1"><a class="header-anchor" href="#class-pluginmetadata-basemodel"><span><strong>class</strong> <code>PluginMetadata(BaseModel)</code></span></a></h3><h3 id="class-plugin-basemodel" tabindex="-1"><a class="header-anchor" href="#class-plugin-basemodel"><span><strong>class</strong> <code>Plugin(BaseModel)</code></span></a></h3><h3 id="method-hash-self" tabindex="-1"><a class="header-anchor" href="#method-hash-self"><span><em>method</em> <code>__hash__(self)</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">__hash__</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as e,o as a,c as s,e as t}from"./app-gnbtOU7f.js";const n={},l=t(`<h3 id="class-plugintype-enum" tabindex="-1"><a class="header-anchor" href="#class-plugintype-enum"><span><strong>class</strong> <code>PluginType(Enum)</code></span></a></h3><h3 id="class-pluginmetadata-basemodel" tabindex="-1"><a class="header-anchor" href="#class-pluginmetadata-basemodel"><span><strong>class</strong> <code>PluginMetadata(BaseModel)</code></span></a></h3><h3 id="class-plugin-basemodel" tabindex="-1"><a class="header-anchor" href="#class-plugin-basemodel"><span><strong>class</strong> <code>Plugin(BaseModel)</code></span></a></h3><h3 id="method-hash-self" tabindex="-1"><a class="header-anchor" href="#method-hash-self"><span><em>method</em> <code>__hash__(self)</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">__hash__</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> <span class="token builtin">hash</span><span class="token punctuation">(</span>self<span class="token punctuation">.</span>module_name<span class="token punctuation">)</span>
|
<span class="token keyword">return</span> <span class="token builtin">hash</span><span class="token punctuation">(</span>self<span class="token punctuation">.</span>module_name<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></div></details>`,5),o=[l];function i(d,c){return a(),s("div",null,o)}const r=e(n,[["render",i],["__file","model.html.vue"]]),u=JSON.parse('{"path":"/en/dev/api/plugin/model.html","title":"liteyuki.plugin.model","lang":"en-US","frontmatter":{"title":"liteyuki.plugin.model","description":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/model.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/model.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugin.model"}],["meta",{"property":"og:description","content":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) Source code"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.model\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class PluginType(Enum)","slug":"class-plugintype-enum","link":"#class-plugintype-enum","children":[]},{"level":3,"title":"class PluginMetadata(BaseModel)","slug":"class-pluginmetadata-basemodel","link":"#class-pluginmetadata-basemodel","children":[]},{"level":3,"title":"class Plugin(BaseModel)","slug":"class-plugin-basemodel","link":"#class-plugin-basemodel","children":[]},{"level":3,"title":"method __hash__(self)","slug":"method-hash-self","link":"#method-hash-self","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.1,"words":29},"filePathRelative":"en/dev/api/plugin/model.md","localizedDate":"August 21, 2024","autoDesc":true}');export{r as comp,u as data};
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div></details>`,5),o=[l];function i(d,c){return a(),s("div",null,o)}const r=e(n,[["render",i],["__file","model.html.vue"]]),u=JSON.parse('{"path":"/en/dev/api/plugin/model.html","title":"liteyuki.plugin.model","lang":"en-US","frontmatter":{"title":"liteyuki.plugin.model","description":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) Source code","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/model.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/plugin/model.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.plugin.model"}],["meta",{"property":"og:description","content":"class PluginType(Enum) class PluginMetadata(BaseModel) class Plugin(BaseModel) method __hash__(self) Source code"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.model\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class PluginType(Enum)","slug":"class-plugintype-enum","link":"#class-plugintype-enum","children":[]},{"level":3,"title":"class PluginMetadata(BaseModel)","slug":"class-pluginmetadata-basemodel","link":"#class-pluginmetadata-basemodel","children":[]},{"level":3,"title":"class Plugin(BaseModel)","slug":"class-plugin-basemodel","link":"#class-plugin-basemodel","children":[]},{"level":3,"title":"method __hash__(self)","slug":"method-hash-self","link":"#method-hash-self","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.1,"words":29},"filePathRelative":"en/dev/api/plugin/model.md","localizedDate":"August 21, 2024","autoDesc":true}');export{r as comp,u as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as s,e as a}from"./app-BrSLFMno.js";const t={},o=a(`<h3 id="func-debounce" tabindex="-1"><a class="header-anchor" href="#func-debounce"><span><em>func</em> <code>debounce()</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">debounce</span><span class="token punctuation">(</span>wait<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as e,c as s,e as a}from"./app-gnbtOU7f.js";const t={},o=a(`<h3 id="func-debounce" tabindex="-1"><a class="header-anchor" href="#func-debounce"><span><em>func</em> <code>debounce()</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">debounce</span><span class="token punctuation">(</span>wait<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
防抖函数
|
防抖函数
|
||||||
"""</span>
|
"""</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as s,e as a}from"./app-BrSLFMno.js";const t={},o=a(`<h3 id="func-debounce" tabindex="-1"><a class="header-anchor" href="#func-debounce"><span><em>func</em> <code>debounce()</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">debounce</span><span class="token punctuation">(</span>wait<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as e,o as n,c as s,e as a}from"./app-gnbtOU7f.js";const t={},o=a(`<h3 id="func-debounce" tabindex="-1"><a class="header-anchor" href="#func-debounce"><span><em>func</em> <code>debounce()</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">debounce</span><span class="token punctuation">(</span>wait<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
防抖函数
|
防抖函数
|
||||||
"""</span>
|
"""</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="func-add-matcher" tabindex="-1"><a class="header-anchor" href="#func-add-matcher"><span><em>func</em> <code>add_matcher()</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">add_matcher</span><span class="token punctuation">(</span>matcher<span class="token punctuation">:</span> Matcher<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as a,c as s,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="func-add-matcher" tabindex="-1"><a class="header-anchor" href="#func-add-matcher"><span><em>func</em> <code>add_matcher()</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">add_matcher</span><span class="token punctuation">(</span>matcher<span class="token punctuation">:</span> Matcher<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">for</span> <span class="token punctuation">(</span>i<span class="token punctuation">,</span> m<span class="token punctuation">)</span> <span class="token keyword">in</span> <span class="token builtin">enumerate</span><span class="token punctuation">(</span>_matcher_list<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
<span class="token keyword">for</span> <span class="token punctuation">(</span>i<span class="token punctuation">,</span> m<span class="token punctuation">)</span> <span class="token keyword">in</span> <span class="token builtin">enumerate</span><span class="token punctuation">(</span>_matcher_list<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">if</span> m<span class="token punctuation">.</span>priority <span class="token operator"><</span> matcher<span class="token punctuation">.</span>priority<span class="token punctuation">:</span>
|
<span class="token keyword">if</span> m<span class="token punctuation">.</span>priority <span class="token operator"><</span> matcher<span class="token punctuation">.</span>priority<span class="token punctuation">:</span>
|
||||||
_matcher_list<span class="token punctuation">.</span>insert<span class="token punctuation">(</span>i<span class="token punctuation">,</span> matcher<span class="token punctuation">)</span>
|
_matcher_list<span class="token punctuation">.</span>insert<span class="token punctuation">(</span>i<span class="token punctuation">,</span> matcher<span class="token punctuation">)</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as s,e}from"./app-BrSLFMno.js";const t={},o=e(`<h3 id="func-add-matcher" tabindex="-1"><a class="header-anchor" href="#func-add-matcher"><span><em>func</em> <code>add_matcher()</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">add_matcher</span><span class="token punctuation">(</span>matcher<span class="token punctuation">:</span> Matcher<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as a,c as s,e}from"./app-gnbtOU7f.js";const t={},o=e(`<h3 id="func-add-matcher" tabindex="-1"><a class="header-anchor" href="#func-add-matcher"><span><em>func</em> <code>add_matcher()</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">add_matcher</span><span class="token punctuation">(</span>matcher<span class="token punctuation">:</span> Matcher<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">for</span> <span class="token punctuation">(</span>i<span class="token punctuation">,</span> m<span class="token punctuation">)</span> <span class="token keyword">in</span> <span class="token builtin">enumerate</span><span class="token punctuation">(</span>_matcher_list<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
<span class="token keyword">for</span> <span class="token punctuation">(</span>i<span class="token punctuation">,</span> m<span class="token punctuation">)</span> <span class="token keyword">in</span> <span class="token builtin">enumerate</span><span class="token punctuation">(</span>_matcher_list<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">if</span> m<span class="token punctuation">.</span>priority <span class="token operator"><</span> matcher<span class="token punctuation">.</span>priority<span class="token punctuation">:</span>
|
<span class="token keyword">if</span> m<span class="token punctuation">.</span>priority <span class="token operator"><</span> matcher<span class="token punctuation">.</span>priority<span class="token punctuation">:</span>
|
||||||
_matcher_list<span class="token punctuation">.</span>insert<span class="token punctuation">(</span>i<span class="token punctuation">,</span> matcher<span class="token punctuation">)</span>
|
_matcher_list<span class="token punctuation">.</span>insert<span class="token punctuation">(</span>i<span class="token punctuation">,</span> matcher<span class="token punctuation">)</span>
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as n,c as r,a}from"./app-BrSLFMno.js";const i={};function p(l,c){const e=o("pluginStoreComp");return n(),r("div",null,[a(e)])}const s=t(i,[["render",p],["__file","plugin.html.vue"]]),u=JSON.parse('{"path":"/en/store/plugin.html","title":"Plugin Store","lang":"en-US","frontmatter":{"title":"Plugin Store","icon":"plug","order":2,"category":"extension","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/store/plugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/plugin.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Plugin 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\\":\\"Plugin 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/plugin.md","localizedDate":"August 16, 2024"}');export{s as comp,u as data};
|
import{_ as t,r as o,o as n,c as r,a}from"./app-gnbtOU7f.js";const i={};function p(l,c){const e=o("pluginStoreComp");return n(),r("div",null,[a(e)])}const s=t(i,[["render",p],["__file","plugin.html.vue"]]),u=JSON.parse('{"path":"/en/store/plugin.html","title":"Plugin Store","lang":"en-US","frontmatter":{"title":"Plugin Store","icon":"plug","order":2,"category":"extension","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/store/plugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/plugin.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Plugin 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\\":\\"Plugin 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/plugin.md","localizedDate":"August 16, 2024"}');export{s as comp,u as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as n,c as r,a}from"./app-BrSLFMno.js";const p={};function i(l,c){const e=o("pluginStoreComp");return n(),r("div",null,[a(e)])}const s=t(p,[["render",i],["__file","plugin.html.vue"]]),d=JSON.parse('{"path":"/store/plugin.html","title":"插件商店","lang":"zh-CN","frontmatter":{"title":"插件商店","icon":"plug","order":2,"category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/plugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/plugin.html"}],["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-04-19T20:10:20.000Z"}],["meta",{"property":"article:modified_time","content":"2024-04-19T20:10:20.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"插件商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-19T20:10:20.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1713557420000,"updatedTime":1713557420000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"store/plugin.md","localizedDate":"2024年4月19日"}');export{s as comp,d as data};
|
import{_ as t,r as o,o as n,c as r,a}from"./app-gnbtOU7f.js";const p={};function i(l,c){const e=o("pluginStoreComp");return n(),r("div",null,[a(e)])}const s=t(p,[["render",i],["__file","plugin.html.vue"]]),d=JSON.parse('{"path":"/store/plugin.html","title":"插件商店","lang":"zh-CN","frontmatter":{"title":"插件商店","icon":"plug","order":2,"category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/plugin.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/plugin.html"}],["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-04-19T20:10:20.000Z"}],["meta",{"property":"article:modified_time","content":"2024-04-19T20:10:20.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"插件商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-19T20:10:20.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1713557420000,"updatedTime":1713557420000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"store/plugin.md","localizedDate":"2024年4月19日"}');export{s as comp,d as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as t,c as e,e as a}from"./app-BrSLFMno.js";const s={},p=a(`<h3 id="func-run-plugins" tabindex="-1"><a class="header-anchor" href="#func-run-plugins"><span><em>func</em> <code>run_plugins()</code></span></a></h3><p><strong>说明</strong>: 运行插件,无需手动初始化bot</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</li></ul></blockquote><details><summary><b>源代码</b></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">run_plugins</span><span class="token punctuation">(</span><span class="token operator">*</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as t,c as e,e as a}from"./app-gnbtOU7f.js";const s={},p=a(`<h3 id="func-run-plugins" tabindex="-1"><a class="header-anchor" href="#func-run-plugins"><span><em>func</em> <code>run_plugins()</code></span></a></h3><p><strong>说明</strong>: 运行插件,无需手动初始化bot</p><p><strong>参数</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</li></ul></blockquote><details><summary><b>源代码</b></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">run_plugins</span><span class="token punctuation">(</span><span class="token operator">*</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
运行插件,无需手动初始化bot
|
运行插件,无需手动初始化bot
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as t,c as e,e as s}from"./app-BrSLFMno.js";const a={},o=s(`<h3 id="func-run-plugins" tabindex="-1"><a class="header-anchor" href="#func-run-plugins"><span><em>func</em> <code>run_plugins()</code></span></a></h3><p><strong>Description</strong>: 运行插件,无需手动初始化bot</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</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">run_plugins</span><span class="token punctuation">(</span><span class="token operator">*</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
import{_ as n,o as t,c as e,e as s}from"./app-gnbtOU7f.js";const a={},o=s(`<h3 id="func-run-plugins" tabindex="-1"><a class="header-anchor" href="#func-run-plugins"><span><em>func</em> <code>run_plugins()</code></span></a></h3><p><strong>Description</strong>: 运行插件,无需手动初始化bot</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>module_path: 插件路径,参考<code>liteyuki.load_plugin</code>的函数签名</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">run_plugins</span><span class="token punctuation">(</span><span class="token operator">*</span>module_path<span class="token punctuation">:</span> <span class="token builtin">str</span> <span class="token operator">|</span> Path<span class="token punctuation">)</span><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
运行插件,无需手动初始化bot
|
运行插件,无需手动初始化bot
|
||||||
Args:
|
Args:
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as r,c as a,a as n}from"./app-BrSLFMno.js";const c={};function s(p,m){const e=o("resourceStoreComp");return r(),a("div",null,[n(e)])}const l=t(c,[["render",s],["__file","resource.html.vue"]]),d=JSON.parse('{"path":"/store/resource.html","title":"资源商店","lang":"zh-CN","frontmatter":{"title":"资源商店","icon":"box","order":1,"category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/resource.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/resource.html"}],["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-01T04:23:56.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-01T04:23:56.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-01T04:23:56.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1713557420000,"updatedTime":1722486236000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"store/resource.md","localizedDate":"2024年4月19日"}');export{l as comp,d as data};
|
import{_ as t,r as o,o as r,c as a,a as n}from"./app-gnbtOU7f.js";const c={};function s(p,m){const e=o("resourceStoreComp");return r(),a("div",null,[n(e)])}const l=t(c,[["render",s],["__file","resource.html.vue"]]),d=JSON.parse('{"path":"/store/resource.html","title":"资源商店","lang":"zh-CN","frontmatter":{"title":"资源商店","icon":"box","order":1,"category":"使用手册","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/resource.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/store/resource.html"}],["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-01T04:23:56.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-01T04:23:56.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"资源商店\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-01T04:23:56.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1713557420000,"updatedTime":1722486236000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.05,"words":16},"filePathRelative":"store/resource.md","localizedDate":"2024年4月19日"}');export{l as comp,d as data};
|
@ -1 +1 @@
|
|||||||
import{_ as t,r as o,o as r,c as n,a}from"./app-BrSLFMno.js";const c={};function s(p,m){const e=o("resourceStoreComp");return r(),n("div",null,[a(e)])}const l=t(c,[["render",s],["__file","resource.html.vue"]]),d=JSON.parse('{"path":"/en/store/resource.html","title":"Resource Store","lang":"en-US","frontmatter":{"title":"Resource Store","icon":"box","order":1,"category":"extension","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/store/resource.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/resource.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Resource 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\\":\\"Resource 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/resource.md","localizedDate":"August 16, 2024"}');export{l as comp,d as data};
|
import{_ as t,r as o,o as r,c as n,a}from"./app-gnbtOU7f.js";const c={};function s(p,m){const e=o("resourceStoreComp");return r(),n("div",null,[a(e)])}const l=t(c,[["render",s],["__file","resource.html.vue"]]),d=JSON.parse('{"path":"/en/store/resource.html","title":"Resource Store","lang":"en-US","frontmatter":{"title":"Resource Store","icon":"box","order":1,"category":"extension","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/store/resource.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/store/resource.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"Resource 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\\":\\"Resource 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/resource.md","localizedDate":"August 16, 2024"}');export{l as comp,d as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as e,c as a,e as t}from"./app-BrSLFMno.js";const s={},l=t(`<h3 id="class-rpc" tabindex="-1"><a class="header-anchor" href="#class-rpc"><span><strong>class</strong> <code>RPC</code></span></a></h3><h3 id="method-init-self-on-calling-on-calling-func-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-on-calling-on-calling-func-none"><span><em>method</em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</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> on_calling<span class="token punctuation">:</span> ON_CALLING_FUNC<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
import{_ as n,o as e,c as a,e as t}from"./app-gnbtOU7f.js";const s={},l=t(`<h3 id="class-rpc" tabindex="-1"><a class="header-anchor" href="#class-rpc"><span><strong>class</strong> <code>RPC</code></span></a></h3><h3 id="method-init-self-on-calling-on-calling-func-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-on-calling-on-calling-func-none"><span><em>method</em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</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> on_calling<span class="token punctuation">:</span> ON_CALLING_FUNC<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
||||||
self<span class="token punctuation">.</span>on_calling <span class="token operator">=</span> on_calling
|
self<span class="token punctuation">.</span>on_calling <span class="token operator">=</span> on_calling
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div></details><h3 id="method-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><a class="header-anchor" href="#method-call-self-args-tuple-kwargs-dict-any"><span><em>method</em> <code>call(self, args: tuple, kwargs: dict) -> Any</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">call</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> args<span class="token punctuation">:</span> <span class="token builtin">tuple</span><span class="token punctuation">,</span> kwargs<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Any<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></div></details><h3 id="method-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><a class="header-anchor" href="#method-call-self-args-tuple-kwargs-dict-any"><span><em>method</em> <code>call(self, args: tuple, kwargs: dict) -> Any</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">call</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> args<span class="token punctuation">:</span> <span class="token builtin">tuple</span><span class="token punctuation">,</span> kwargs<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Any<span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as n,o as a,c as e,e as t}from"./app-BrSLFMno.js";const s={},l=t(`<h3 id="class-rpc" tabindex="-1"><a class="header-anchor" href="#class-rpc"><span><strong>class</strong> <code>RPC</code></span></a></h3><h3 id="method-init-self-on-calling-on-calling-func-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-on-calling-on-calling-func-none"><span><em>method</em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</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> on_calling<span class="token punctuation">:</span> ON_CALLING_FUNC<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
import{_ as n,o as a,c as e,e as t}from"./app-gnbtOU7f.js";const s={},l=t(`<h3 id="class-rpc" tabindex="-1"><a class="header-anchor" href="#class-rpc"><span><strong>class</strong> <code>RPC</code></span></a></h3><h3 id="method-init-self-on-calling-on-calling-func-none" tabindex="-1"><a class="header-anchor" href="#method-init-self-on-calling-on-calling-func-none"><span><em>method</em> <code>__init__(self, on_calling: ON_CALLING_FUNC) -> None</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> on_calling<span class="token punctuation">:</span> ON_CALLING_FUNC<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token boolean">None</span><span class="token punctuation">:</span>
|
||||||
self<span class="token punctuation">.</span>on_calling <span class="token operator">=</span> on_calling
|
self<span class="token punctuation">.</span>on_calling <span class="token operator">=</span> on_calling
|
||||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div></details><h3 id="method-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><a class="header-anchor" href="#method-call-self-args-tuple-kwargs-dict-any"><span><em>method</em> <code>call(self, args: tuple, kwargs: dict) -> Any</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">call</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> args<span class="token punctuation">:</span> <span class="token builtin">tuple</span><span class="token punctuation">,</span> kwargs<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Any<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></div></details><h3 id="method-call-self-args-tuple-kwargs-dict-any" tabindex="-1"><a class="header-anchor" href="#method-call-self-args-tuple-kwargs-dict-any"><span><em>method</em> <code>call(self, args: tuple, kwargs: dict) -> Any</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">call</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> args<span class="token punctuation">:</span> <span class="token builtin">tuple</span><span class="token punctuation">,</span> kwargs<span class="token punctuation">:</span> <span class="token builtin">dict</span><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> Any<span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as s,e as a}from"./app-BrSLFMno.js";const t={},l=a(`<h3 id="rule" tabindex="-1"><a class="header-anchor" href="#rule"><span><code>@Rule</code></span></a></h3><h3 id="async-func-empty-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-empty-rule-bool"><span><em>async func</em> <code>empty_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
import{_ as e,o as n,c as s,e as a}from"./app-gnbtOU7f.js";const t={},l=a(`<h3 id="rule" tabindex="-1"><a class="header-anchor" href="#rule"><span><code>@Rule</code></span></a></h3><h3 id="async-func-empty-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-empty-rule-bool"><span><em>async func</em> <code>empty_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
||||||
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">empty_rule</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">bool</span><span class="token punctuation">:</span>
|
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">empty_rule</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">bool</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> <span class="token boolean">True</span>
|
<span class="token keyword">return</span> <span class="token boolean">True</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></details><h3 id="rule-1" tabindex="-1"><a class="header-anchor" href="#rule-1"><span><code>@Rule</code></span></a></h3><h3 id="async-func-is-su-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-is-su-rule-bool"><span><em>async func</em> <code>is_su_rule() -> bool</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 decorator annotation punctuation">@Rule</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></details><h3 id="rule-1" tabindex="-1"><a class="header-anchor" href="#rule-1"><span><code>@Rule</code></span></a></h3><h3 id="async-func-is-su-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-is-su-rule-bool"><span><em>async func</em> <code>is_su_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as s,e as a}from"./app-BrSLFMno.js";const t={},l=a(`<h3 id="rule" tabindex="-1"><a class="header-anchor" href="#rule"><span><code>@Rule</code></span></a></h3><h3 id="async-func-empty-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-empty-rule-bool"><span><em>async func</em> <code>empty_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
import{_ as e,o as n,c as s,e as a}from"./app-gnbtOU7f.js";const t={},l=a(`<h3 id="rule" tabindex="-1"><a class="header-anchor" href="#rule"><span><code>@Rule</code></span></a></h3><h3 id="async-func-empty-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-empty-rule-bool"><span><em>async func</em> <code>empty_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
||||||
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">empty_rule</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">bool</span><span class="token punctuation">:</span>
|
<span class="token keyword">async</span> <span class="token keyword">def</span> <span class="token function">empty_rule</span><span class="token punctuation">(</span>event<span class="token punctuation">:</span> MessageEvent<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">></span> <span class="token builtin">bool</span><span class="token punctuation">:</span>
|
||||||
<span class="token keyword">return</span> <span class="token boolean">True</span>
|
<span class="token keyword">return</span> <span class="token boolean">True</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></details><h3 id="rule-1" tabindex="-1"><a class="header-anchor" href="#rule-1"><span><code>@Rule</code></span></a></h3><h3 id="async-func-is-su-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-is-su-rule-bool"><span><em>async func</em> <code>is_su_rule() -> bool</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 decorator annotation punctuation">@Rule</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></details><h3 id="rule-1" tabindex="-1"><a class="header-anchor" href="#rule-1"><span><code>@Rule</code></span></a></h3><h3 id="async-func-is-su-rule-bool" tabindex="-1"><a class="header-anchor" href="#async-func-is-su-rule-bool"><span><em>async func</em> <code>is_su_rule() -> bool</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 decorator annotation punctuation">@Rule</span>
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as s}from"./app-BrSLFMno.js";const o={};function a(i,n){return t(),s("div")}const m=e(o,[["render",a],["__file","session.html.vue"]]),p=JSON.parse('{"path":"/dev/api/message/session.html","title":"liteyuki.message.session","lang":"zh-CN","frontmatter":{"title":"liteyuki.message.session","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/session.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/session.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.message.session"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.session\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/message/session.md","localizedDate":"2024年8月21日"}');export{m as comp,p as data};
|
import{_ as e,o as t,c as s}from"./app-gnbtOU7f.js";const o={};function a(i,n){return t(),s("div")}const m=e(o,[["render",a],["__file","session.html.vue"]]),p=JSON.parse('{"path":"/dev/api/message/session.html","title":"liteyuki.message.session","lang":"zh-CN","frontmatter":{"title":"liteyuki.message.session","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/session.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/session.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"liteyuki.message.session"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.session\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"dev/api/message/session.md","localizedDate":"2024年8月21日"}');export{m as comp,p as data};
|
@ -1 +1 @@
|
|||||||
import{_ as e,o as t,c as s}from"./app-BrSLFMno.js";const o={};function a(i,n){return t(),s("div")}const m=e(o,[["render",a],["__file","session.html.vue"]]),p=JSON.parse('{"path":"/en/dev/api/message/session.html","title":"liteyuki.message.session","lang":"en-US","frontmatter":{"title":"liteyuki.message.session","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/session.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/session.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message.session"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.session\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/message/session.md","localizedDate":"August 21, 2024"}');export{m as comp,p as data};
|
import{_ as e,o as t,c as s}from"./app-gnbtOU7f.js";const o={};function a(i,n){return t(),s("div")}const m=e(o,[["render",a],["__file","session.html.vue"]]),p=JSON.parse('{"path":"/en/dev/api/message/session.html","title":"liteyuki.message.session","lang":"en-US","frontmatter":{"title":"liteyuki.message.session","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/session.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/session.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message.session"}],["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-29T06:19:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:19:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.session\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:19:39.000Z\\",\\"author\\":[]}"]]},"headers":[],"git":{"createdTime":1724234361000,"updatedTime":1724912379000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.01,"words":2},"filePathRelative":"en/dev/api/message/session.md","localizedDate":"August 21, 2024"}');export{m as comp,p as data};
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as n,c as s,e as a}from"./app-BrSLFMno.js";const t={},o=a(`<h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><strong>class</strong> <code>SocksChannel</code></span></a></h3><h3 id="method-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str"><span><em>method</em> <code>__init__(self, name: str)</code></span></a></h3><p><strong>Description</strong>: 初始化通道</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道ID</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">__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><span class="token punctuation">:</span>
|
import{_ as e,o as n,c as s,e as a}from"./app-gnbtOU7f.js";const t={},o=a(`<h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><strong>class</strong> <code>SocksChannel</code></span></a></h3><h3 id="method-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str"><span><em>method</em> <code>__init__(self, name: str)</code></span></a></h3><p><strong>Description</strong>: 初始化通道</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>name: 通道ID</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">__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><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
初始化通道
|
初始化通道
|
||||||
Args:
|
Args:
|
@ -1,4 +1,4 @@
|
|||||||
import{_ as e,o as s,c as n,e as a}from"./app-BrSLFMno.js";const t={},l=a(`<h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><strong>class</strong> <code>SocksChannel</code></span></a></h3><h3 id="method-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str"><span><em>method</em> <code>__init__(self, name: str)</code></span></a></h3><p><strong>说明</strong>: 初始化通道</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道ID</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">__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><span class="token punctuation">:</span>
|
import{_ as e,o as s,c as n,e as a}from"./app-gnbtOU7f.js";const t={},l=a(`<h3 id="class-sockschannel" tabindex="-1"><a class="header-anchor" href="#class-sockschannel"><span><strong>class</strong> <code>SocksChannel</code></span></a></h3><h3 id="method-init-self-name-str" tabindex="-1"><a class="header-anchor" href="#method-init-self-name-str"><span><em>method</em> <code>__init__(self, name: str)</code></span></a></h3><p><strong>说明</strong>: 初始化通道</p><p><strong>参数</strong>:</p><blockquote><ul><li>name: 通道ID</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">__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><span class="token punctuation">:</span>
|
||||||
<span class="token triple-quoted-string string">"""
|
<span class="token triple-quoted-string string">"""
|
||||||
初始化通道
|
初始化通道
|
||||||
Args:
|
Args:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user