Basic Configuration Core
Core configuration options for ChatAI Plugin.
Configuration File
Location: plugins/chatai-plugin/config/config.yaml
Core Options
yaml
# Command prefix
commandPrefix: "#"
# Debug mode
debug: false
# Master users (bot owners)
masters:
- "123456789"
- "987654321"
# Web panel port
web:
enabled: true
port: 3000
host: "127.0.0.1"Option Reference
| Option | Type | Default | Description |
|---|---|---|---|
commandPrefix | string | "#" | Command prefix |
debug | boolean | false | Enable debug logging |
masters | array | [] | Master user IDs |
web.enabled | boolean | true | Enable web panel |
web.port | number | 3000 | Web panel port |
web.host | string | 127.0.0.1 | Listen address |
Command Prefix
All commands use this prefix:
yaml
commandPrefix: "#"Commands: #ai状态, #ai管理面板, #结束对话
Debug Mode
Enable verbose logging:
yaml
debug: trueOr via command:
txt
#ai调试开启
#ai调试关闭Master Users
Bot owners with full permissions:
yaml
masters:
- "123456789" # QQ numberMasters can:
- Access all commands
- Use dangerous tools
- Manage all groups
- Access admin panel
Web Panel
yaml
web:
enabled: true
port: 3000
host: "0.0.0.0" # Allow external access
ssl:
enabled: false
cert: "./cert.pem"
key: "./key.pem"Security
Use 127.0.0.1 (localhost only) unless you need external access. If exposing externally, enable SSL and use strong auth.
Logging
yaml
logging:
level: info # debug, info, warn, error
file: true # Log to file
console: true # Log to console
maxSize: 10485760 # 10MB max per file
maxFiles: 5 # Keep 5 log filesHot Reload
Most settings reload without restart:
txt
#ai重载配置Settings requiring restart:
- Web server port
- Database path
- SSL configuration