import{_ as i,o as a,c as t,a7 as n}from"./chunks/framework._avq4Ty7.js";const c=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"};function l(o,s,h,p,k,r){return a(),t("div",null,s[0]||(s[0]=[n(`
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.
# 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
The following is the default value. If you need to customize it, please add it manually
# 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
...
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
Fields | Value | Description |
---|---|---|
protocol | Reverse WebSocket | Liteyuki-NoneBot as server |
address | ws://127.0.0.1:20216/onebot/v11/ws | The address depends on the configuration file, the default is \` |
AccessToken | "" | If you have configured AccessToken for Liteyuki, please fill in the same value here |