app/assets/config.html-Cw4NsRZ3.js

34 lines
12 KiB
JavaScript
Raw Normal View History

import{_ as e,r as t,o,c,b as n,d as s,a as l,e as p}from"./app-DuYQPtzk.js";const i={},r=p(`<p>轻雪支持<code>yaml</code>、<code>json</code>和<code>toml</code>作为配置文件,取决于你个人的喜好</p><p>首次运行后生成<code>config.yml</code>和<code>config</code>目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改<code>superusers</code>及<code>nickname</code>字段即可</p><p>启动时会加载项目目录下<code>config.yml/yaml/json/toml</code>和<code>config</code>目录下的所有配置文件,你可在<code>config</code>目录下创建多个配置文件,轻雪会自动合并这些配置文件</p><h2 id="基础配置项" tabindex="-1"><a class="header-anchor" href="#基础配置项"><span><strong>基础配置项</strong></span></a></h2><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token key atrule">nonebot</span><span class="token punctuation">:</span>
<span class="token comment"># Nonebot机器人的配置以前的最外层配置项仍可为Nonebot服务但是部分内容会被覆盖请尽快迁移</span>
<span class="token key atrule">command_start</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;/&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&quot;</span> <span class="token punctuation">]</span> <span class="token comment"># &quot;&quot;alconna_use_command_startalconna</span>
<span class="token key atrule">host</span><span class="token punctuation">:</span> 127.0.0.1 <span class="token comment"># 0.0.0.0</span>
<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 key atrule">liteyuki</span><span class="token punctuation">:</span>
<span class="token comment"># 写在外层的配置项将会被覆盖建议迁移到liteyuki下</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">auto_update</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 4</span>
<span class="token key atrule">plugins</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">]</span> <span class="token comment"># </span>
<span class="token key atrule">plugin_dirs</span><span class="token punctuation">:</span> <span class="token punctuation">[</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></div><h2 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h2><p></p><div class="language-yaml line-numbers-mode" data-ext="yml" data-title="yml"><pre class="language-yaml"><code><span class="token comment"># NoneBot</span>
<span class="token key atrule">nonebot</span><span class="token punctuation">:</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"># </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"># alconnafalse</span>
<span class="token key atrule">safe_mode</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># NoneBot</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 comment"># 开发者选项</span>
<span class="token key atrule">liteyuki</span><span class="token punctuation">:</span>
<span class="token key atrule">allow_update</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># </span>
<span class="token key atrule">debug</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># Bot</span>
<span class="token key atrule">dev_mode</span><span class="token punctuation">:</span> <span class="token boolean important">false</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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="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><div class="hint-container tip"><p class="hint-container-title"></p><p>使NoneBotdotenv<code>.env.{ENVIRONMENT}</code><code>config.yml</code><code>nonebot.environment:{ENVIRONMENT}</code></p></div><h2 id="nonebotonebot" tabindex="-1"><a class="header-anchor" href="#nonebotonebot"><span><strong>NoneBotOneBot</strong></span></a></h2><p>WebSocket </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://127.0.0.1:20216/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><h2 id="" tabindex="-1"><a class="header-anchor" href="#"><span><strong></strong></span></a></h2>`,13),u={href:"https://onebot.adapters.nonebot.dev/",target:"_blank",rel:"noopener noreferrer"},d=n("li",null,"OneBot使NoneBot2",-1);function m(k,v){const a=t("ExternalLinkIcon");return o(),c("div",null,[r,n("ul",null,[n("li",null,[s("使访"),n("a",u,[s("OneBot Adapter"),l(a)]),s("")]),d])])}const b=e(i,[["render",m],["__file","config.html.vue"]]),y=JSON.parse('{"path":"/deploy/config.html","title":"","lang":"zh-CN","frontmatter":{"title":"","icon":"cog","order":2,"category":"使","tag":["",""],"description":"yamljsontoml config.ymlconfigsuperusersnickname config.yml/yaml/json/tomlconfigconfig...","head":[["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuepress-theme-hope-docs-demo.netlify.app/en/deploy/config.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/deploy/config.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":""}],["meta",{"property":"og:description","content":"yamljsontoml config.ymlconfigsuperusersnickname config.yml/yaml/json/tomlconfigconfig..."}],["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:tag","content":""}],["meta",{"property":"article:tag","content":""}],["meta",{"property":"article:modified_t