import{_ as s,r as t,o,c,b as n,d as a,a as l,e as p}from"./app-OU_n92lF.js";const i={},r=p(`
轻雪支持yaml
、json
和toml
作为配置文件,取决于你个人的喜好
首次运行后生成config.yml
和config
目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusers
及nickname
字段即可
启动时会加载项目目录下config.yml/yaml/json/toml
和config
目录下的所有配置文件,你可在config
目录下创建多个配置文件,轻雪会自动合并这些配置文件
command_start: [ "/", "" ]
host: 127.0.0.1
port: 20216
nickname: [ "liteyuki" ]
superusers: [ "1919810" ]
以下为默认值,如需自定义请手动添加
onebot_access_token: ""
default_language: "zh-CN"
alconna_auto_completion: false
allow_update: true
log_level: "INFO"
log_icon: true
auto_report: true
auto_update: true
debug: false
safe_mode: false
custom_config_1: "custom_value1"
custom_config_2: "custom_value2"
...
提示
如果要使用dotenv配置文件,请自行创建.env.{ENVIRONMENT}
,并在config.yml
中添加environment:{ENVIRONMENT}
字段
生产环境中推荐反向WebSocket 不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值
字段 | 参考值 | 说明 |
---|
协议 | 反向WebSocket | 推荐使用反向ws协议进行通信,即轻雪作为服务端 |
地址 | ws://127.0.0.1:20216/onebot/v11/ws | 地址取决于配置文件,本机默认为127.0.0.1:20216 |
AccessToken | "" | 如果你给轻雪配置了AccessToken ,请在此填写相同的值 |
`,13),d={href:"https://onebot.adapters.nonebot.dev/",target:"_blank",rel:"noopener noreferrer"},u=n("li",null,"轻雪不局限于OneBot适配器,你可以使用NoneBot2支持的任何适配器",-1);function m(k,g){const e=t("ExternalLinkIcon");return o(),c("div",null,[r,n("ul",null,[n("li",null,[a("要使用其他通信方式请访问"),n("a",d,[a("OneBot Adapter"),l(e)]),a("获取详细信息")]),u])])}const y=s(i,[["render",m],["__file","config.html.vue"]]),h=JSON.parse('{"path":"/deployment/config.html","title":"配置","lang":"zh-CN","frontmatter":{"title":"配置","icon":"cog","order":2,"category":"使用指南","tag":["配置","部署"],"description":"轻雪支持yaml、json和toml作为配置文件,取决于你个人的喜好 首次运行后生成config.yml和config目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusers及nickname字段即可 启动时会加载项目目录下config.yml/yaml/json/toml和config目录下的所有配置文件,你可在config目...","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":"轻雪支持yaml、json和toml作为配置文件,取决于你个人的喜好 首次运行后生成config.yml和config目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusers及nickname字段即可 启动时会加载项目目录下config.yml/yaml/json/toml和config目录下的所有配置文件,你可在config目..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-11T18:40:51.000Z"}],["meta",{"property":"article:author","content":"远野千束"}],["meta",{"property":"article:tag","content":"配置"}],["meta",{"property":"article:tag","content":"部署"}],["meta",{"property":"article:modified_time","content":"2024-08-11T18:40:51.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"配置\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-11T18:40:51.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"远野千束\\",\\"url\\":\\"https://sfkm.me\\"}]}"]]},"headers":[{"level":2,"title":"基础配置项","slug":"基础配置项","link":"#基础配置项","children":[]},{"level":2,"title":"其他配置","slug":"其他配置","link":"#其他配置","children":[]},{"level":2,"title":"OneBot实现端配置","slug":"onebot实现端配置","link":"#onebot实现端配置","children":[]},{"level":2,"title":"其他","slug":"其他","link":"#其他","children":[]}],"git":{"createdTime":1711589926000,"updatedTime":1723401651000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":21},{"name":"Snowykami","email":"79104275+snowykami@users.noreply.github.com","commits":2}]},"readingTime":{"minutes":2.05,"words":615},"filePathRelative":"deployment/config.md","localizedDate":"2024年3月28日","autoDesc":true}');export{y as comp,h as data};