Skip to content

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

OptionTypeDefaultDescription
commandPrefixstring"#"Command prefix
debugbooleanfalseEnable debug logging
mastersarray[]Master user IDs
web.enabledbooleantrueEnable web panel
web.portnumber3000Web panel port
web.hoststring127.0.0.1Listen address

Command Prefix

All commands use this prefix:

yaml
commandPrefix: "#"

Commands: #ai状态, #ai管理面板, #结束对话

Debug Mode

Enable verbose logging:

yaml
debug: true

Or via command:

txt
#ai调试开启
#ai调试关闭

Master Users

Bot owners with full permissions:

yaml
masters:
  - "123456789"    # QQ number

Masters 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 files

Hot Reload

Most settings reload without restart:

txt
#ai重载配置

Settings requiring restart:

  • Web server port
  • Database path
  • SSL configuration

Next Steps

Released under the MIT License