import{_ as s,c as i,o as a,a6 as t}from"./chunks/framework.BcfwU5BI.js";const u=JSON.parse('{"title":"Configurations","description":"","frontmatter":{"title":"Configurations","order":2},"headers":[],"relativePath":"en/deploy/config.md","filePath":"en/deploy/config.md","lastUpdated":1725101868000}'),e={name:"en/deploy/config.md"},n=t(`

Configurations

LiteyukiBot supports yaml, json, and toml as configuration files, depending on your personal preference.

When you first run LiteyukiBot, it will generate config.yml and the config directory. You can modify the configuration items and restart LiteyukiBot. In most cases, you only need to modify the superusers and nickname fields.

When starting, LiteyukiBot will load all configuration files in the project directory config.yml/yaml/json/toml and the config directory. You can create multiple configuration files in the config directory, and LiteyukiBot will automatically merge these configuration files.

Basic Configuration

yaml
# NoneBot configuration
nonebot:
  command_start: [ "/", "" ] # Command prefix, if there is no "" empty command header, please enable alconna_use_command_start to ensure alconna parsing is normal
  host: 127.0.0.1 # Listening address, default is local, if you want to receive external requests, please fill in
  port: 20216 # Binding port
  nickname: [ "liteyuki" ]  # Bot nickname list
  superusers: [ "1919810" ]  # Superuser list
liteyuki:
  log_level: "INFO" # Log level
  log_icon: true # Whether to display the log level icon (some console fonts are not available)
  auto_report: true # Whether to automatically report problems to Liteyuki server
  auto_update: true # Whether to automatically update Liteyuki, check for updates at 4 am every day
  plugins: [ ] # Liteyuki plugin list
  plugin_dirs: [ ] # Liteyuki plugin directory list

Other configurations

The following is the default value. If you need to customize it, please add it manually

yaml
# Advanced configuration
nonebot:
  onebot_access_token: "" # OneBot access token
  default_language: "zh-CN" # Default language
  alconna_auto_completion: false # alconna auto completion
  safe_mode: false # Safe mode, if true, the bot will not load any plugins
  # other nonebot configurations
  custom_config_1: "custom_value1"
  custom_config_2: "custom_value2"

# development configuration
liteyuki:
  allow_update: true # Whether to allow Liteyuki to update
  debug: false  # Debug mode, if true, Liteyuki will output more detailed logs
  dev_mode: false # development mode, if true, Liteyuki will load all plugins in the development directory
...
yaml

Example: Configuration of OneBot implementation side connected to NoneBot

In production environments, it is recommended to use reverse WebSocket The fields provided by different implementation sides may be different, but basically the same. Here is a reference value

FieldsValueDescription
protocolReverse WebSocketLiteyuki-NoneBot as server
addressws://127.0.0.1:20216/onebot/v11/wsThe address depends on the configuration file, the default is \`
AccessToken""If you have configured AccessToken for Liteyuki, please fill in the same value here

Other

`,16),l=[n];function o(h,p,k,r,d,c){return a(),i("div",null,l)}const y=s(e,[["render",o]]);export{u as __pageData,y as default};