app/assets/config.html-wG-iojgm.js

30 lines
11 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as n}from"./plugin-vue_export-helper-DlAUqK2U.js";import{o as s,c as a,b as e}from"./app-D7Kj3wj1.js";const t={},o=e(`<h3 id="轻雪配置项-nonebot插件配置项也可以写在此-与dotenv格式不同-应为小写" tabindex="-1"><a class="header-anchor" href="#轻雪配置项-nonebot插件配置项也可以写在此-与dotenv格式不同-应为小写"><span>轻雪配置项(Nonebot插件配置项也可以写在此与dotenv格式不同应为小写)</span></a></h3><p>配置文件会在首次启动后生成,你可以在<code>config.yml</code>中修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>和<code>nickname</code>。如果不确定字段的含义,请不要修改(部分在自动生成配置文件中未列出,需手动添加)</p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token comment"># 生成文件的配置项</span>
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># 指令前缀,若没有&quot;&quot;空命令头请开启alconna_use_command_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或者你的公网IP</span>
<span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">20216</span> <span class="token comment"># 绑定端口</span>
<span class="token key atrule">nickname</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;liteyuki&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># 机器人昵称</span>
<span class="token key atrule">superusers</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;1919810&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># 超级用户</span>
<span class="token comment"># 未列出的配置项(如要自定义请手动修改)</span>
<span class="token key atrule">onebot_access_token</span><span class="token punctuation">:</span> <span class="token string">&quot;&quot;</span> <span class="token comment"># 访问令牌,对公网开放时建议设置</span>
<span class="token key atrule">default_language</span><span class="token punctuation">:</span> <span class="token string">&quot;zh-CN&quot;</span> <span class="token comment"># 默认语言支持i18n部分语言和自行扩展的语言代码</span>
<span class="token key atrule">log_level</span><span class="token punctuation">:</span> <span class="token string">&quot;INFO&quot;</span> <span class="token comment"># 日志等级</span>
<span class="token key atrule">log_icon</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 是否显示日志等级图标(某些控制台字体不可用)</span>
<span class="token key atrule">auto_report</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 是否自动上报问题给轻雪服务器,仅包含硬件信息和运行软件版本</span>
<span class="token key atrule">fake_device_info</span><span class="token punctuation">:</span> <span class="token comment"># 统计卡片显示的虚假设备信息,用于保护隐私</span>
<span class="token key atrule">cpu</span><span class="token punctuation">:</span>
<span class="token key atrule">brand</span><span class="token punctuation">:</span> AMD
<span class="token key atrule">cores</span><span class="token punctuation">:</span> <span class="token number">16</span> <span class="token comment"># 物理核心数</span>
<span class="token key atrule">logical_cores</span><span class="token punctuation">:</span> <span class="token number">32</span> <span class="token comment"># 逻辑核心数</span>
<span class="token key atrule">frequency</span><span class="token punctuation">:</span> <span class="token number">3600</span> <span class="token comment"># CPU主频MHz</span>
<span class="token key atrule">mem</span><span class="token punctuation">:</span>
<span class="token key atrule">total</span><span class="token punctuation">:</span> <span class="token number">32768000000</span> <span class="token comment"># 内存总数:字节</span>
<span class="token key atrule">alconna_use_command_start</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># alconna是否使用默认指令前缀默认false</span>
<span class="token key atrule">alconna_auto_completion</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># alconna是否自动补全指令默认false建议开启</span>
<span class="token comment"># 其他Nonebot插件的配置项</span>
<span class="token key atrule">custom_config_1</span><span class="token punctuation">:</span> <span class="token string">&quot;custom_value1&quot;</span>
<span class="token key atrule">custom_config_2</span><span class="token punctuation">:</span> <span class="token string">&quot;custom_value2&quot;</span>
<span class="token punctuation">...</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="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="onebot实现端配置" tabindex="-1"><a class="header-anchor" href="#onebot实现端配置"><span>Onebot实现端配置</span></a></h3><p>不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值</p><table><thead><tr><th>字段</th><th>参考值</th><th>说明</th></tr></thead><tbody><tr><td>协议</td><td>反向WebSocket</td><td>推荐使用反向ws协议进行通信即轻雪作为服务端</td></tr><tr><td>地址</td><td>ws://<code>address</code>/onebot/v11/ws</td><td>地址取决于配置文件,本机默认为<code>127.0.0.1:20216</code></td></tr><tr><td>AccessToken</td><td><code>&quot;&quot;</code></td><td>如果你给轻雪配置了<code>AccessToken</code>,请在此填写相同的值</td></tr></tbody></table><h3 id="其他通信方式" tabindex="-1"><a class="header-anchor" href="#其他通信方式"><span>其他通信方式</span></a></h3><ul><li>实现端与轻雪的通信方式不局限为反向WebSocket但是推荐使用反向WebSocket。</li><li>反向WebSocket的优点是轻雪作为服务端可以更好的控制连接适用于生产环境。</li><li>在某些情况下你也可以使用正向WebSocket比如你在开发轻雪插件时可以使用正向WebSocket主动连接实现端</li></ul>`,8),c=[o];function p(l,i){return s(),a("div",null,c)}const d=n(t,[["render",p],["__file","config.html.vue"]]),m=JSON.parse('{"path":"/deployment/config.html","title":"配置","lang":"zh-CN","frontmatter":{"title":"配置","icon":"cog","order":2,"category":"使用指南","tag":["配置","部署"],"description":"轻雪配置项(Nonebot插件配置项也可以写在此与dotenv格式不同应为小写) 配置文件会在首次启动后生成你可以在config.yml中修改配置项后重启轻雪绝大多数情况下你只需要修改superusers和nickname。如果不确定字段的含义请不要修改部分在自动生成配置文件中未列出需手动添加 Onebot实现端配置 不同的实现端给出...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/deployment/config.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot 轻雪机器人"}],["meta",{"property":"og:title","content":"配置"}],["meta",{"property":"og:description","content":"轻雪配置项(Nonebot插件配置项也可以写在此与dotenv格式不同应为小写) 配置文件会在首次启动后生成你可以在config.yml中修改配置项后重启轻雪绝大多数情况下你只需要修改superusers和nickname。如果不确定字段的含义请不要修改部分在自动生成配置文件中未列出需手动添加 Onebot实现端配置 不同的实现端给出..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-04-05T12:07:33.000Z"}],["meta",{"property":"article:author","content":"远野千束"}],["meta",{"property":"article:tag","content":"配置"}],["meta",{"property":"article:tag","content":"部署"}],["meta",{"property":"article:modified_time","content":"2024-04-05T12:07:33.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"配置\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-05T12:07:33.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"远野千束\\",\\"url\\":\\"https://snowykami.me\\"}]}"]]},"headers":[{"level":3,"title":"轻雪配置项(Nonebot插件配置项也可以写在此与dotenv格式不同应为小写)","slug":"轻雪配置项-nonebot插件配置项也可以写在此-与dotenv格式不同-应为小写","link":"#轻雪配置项-nonebot插件配置项也可以写在此-与dotenv格式不同-应为小写","children":[]},{"level":3,"title":"Onebot实现端配置","slug":"onebot实现端配置","link":"#onebot实现端配置","children":[]},{"level":3,"title":"其他通信方式","slug":"其他通信方式","link":"#其他通信方式","children":[]}],"git":{"createdTime":1711589926000,"updatedTime":1712318853000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":10},{"name":"Snowykami","email":"79104275+snowykami@users.noreply.github.com","commits":2}]},"readingTime":{"minutes":2.12,"words":636},"filePathRelative":"deployment/config.md","localizedDate":"2024年3月28日","autoDesc":true}');export{d as comp,m as data};