import{_ as e,r as t,o,c,b as n,d as s,a as l,e as p}from"./app-BuALlcwC.js";const i={},r=p(`

轻雪支持yamljsontoml作为配置文件,取决于你个人的喜好

首次运行后生成config.ymlconfig目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusersnickname字段即可

启动时会加载项目目录下config.yml/yaml/json/tomlconfig目录下的所有配置文件,你可在config目录下创建多个配置文件,轻雪会自动合并这些配置文件

基础配置项

nonebot:
  # Nonebot机器人的配置,以前的最外层配置项仍可为Nonebot服务,但是部分内容会被覆盖,请尽快迁移
  command_start: [ "/", "" ] # 指令前缀,若没有""空命令头,请开启alconna_use_command_start保证alconna解析正常
  host: 127.0.0.1 # 监听地址,默认为本机,若要接收外部请求请填写0.0.0.0
  port: 20216 # 绑定端口
  nickname: [ "liteyuki" ]  # 机器人昵称列表
  superusers: [ "1919810" ]  # 超级用户列表
liteyuki:
  # 写在外层的配置项将会被覆盖,建议迁移到liteyuki下
  log_level: "INFO" # 日志等级
  log_icon: true # 是否显示日志等级图标(某些控制台字体不可用)
  auto_report: true # 是否自动上报问题给轻雪服务器
  auto_update: true # 是否自动更新轻雪,每天4点检查更新
  plugins: [ ] # 轻雪插件列表
  plugin_dirs: [ ] # 轻雪插件目录列表

其他配置

以下为默认值,如需自定义请手动添加

# 高级NoneBot配置
nonebot:
  onebot_access_token: "" # 访问令牌,对公开放时建议设置
  default_language: "zh-CN" # 默认语言
  alconna_auto_completion: false # alconna是否自动补全指令,默认false,建议开启
  safe_mode: false # 安全模式,开启后将不会加载任何第三方NoneBot插件
  # 其他Nonebot插件的配置项
  custom_config_1: "custom_value1"
  custom_config_2: "custom_value2"

# 开发者选项
liteyuki:
  allow_update: true # 是否允许更新
  debug: false  # 轻雪调试,开启会自动重载Bot或者资源,其他插件自带的调试功能也将开启
  dev_mode: false # 开发者模式,开启后将会启动监视者,监视文件变化并自动重载

...

提示

如果要使用NoneBot和dotenv配置文件,请自行创建.env.{ENVIRONMENT},并在config.yml中添加nonebot.environment:{ENVIRONMENT}字段

与NoneBot对接的OneBot实现端配置

生产环境中推荐反向WebSocket 不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值

字段参考值说明
协议反向WebSocket推荐使用反向ws协议进行通信,即轻雪作为服务端
地址ws://127.0.0.1:20216/onebot/v11/ws地址取决于配置文件,本机默认为127.0.0.1:20216
AccessToken""如果你给轻雪配置了AccessToken,请在此填写相同的值

其他

`,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":"轻雪支持yaml、json和toml作为配置文件,取决于你个人的喜好 首次运行后生成config.yml和config目录,你可修改配置项后重启轻雪,绝大多数情况下,你只需要修改superusers及nickname字段即可 启动时会加载项目目录下config.yml/yaml/json/toml和config目录下的所有配置文件,你可在config目...","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":"轻雪支持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: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_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":[{"level":2,"title":"基础配置项","slug":"基础配置项","link":"#基础配置项","children":[]},{"level":2,"title":"其他配置","slug":"其他配置","link":"#其他配置","children":[]},{"level":2,"title":"与NoneBot对接的OneBot实现端配置","slug":"与nonebot对接的onebot实现端配置","link":"#与nonebot对接的onebot实现端配置","children":[]},{"level":2,"title":"其他","slug":"其他","link":"#其他","children":[]}],"git":{"createdTime":1723832665000,"updatedTime":1723832665000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":2.44,"words":733},"filePathRelative":"deploy/config.md","localizedDate":"2024年8月16日","autoDesc":true}');export{b as comp,y as data};