Skip to content

QQ Adapter Configuration

QQ Official Bot adapter configuration guide.

Configuration Format

yaml
qq.{account_id}:
  # QQ platform configuration
  appId: 'your_app_id'           # Required: QQ Bot AppID
  secret: 'your_secret'           # Required: QQ Bot Secret
  token: 'your_token'             # Required: QQ Bot Token
  mode: 'websocket'               # Optional: Connection mode, 'websocket' (default) or 'webhook'
  sandbox: false                  # Optional: Whether sandbox environment, default false
  removeAt: true                  # Optional: Whether to automatically remove @bot content, default true
  maxRetry: 10                    # Optional: Maximum reconnection attempts (WebSocket mode only), default 10
  intents:                        # Optional: Events to listen to (WebSocket mode only)
    - 'GROUP_AT_MESSAGE_CREATE'
    - 'C2C_MESSAGE_CREATE'
    - 'DIRECT_MESSAGE'
    - 'GUILDS'
    - 'GUILD_MEMBERS'
    - 'GUILD_MESSAGE_REACTIONS'
    - 'INTERACTION'
    - 'PUBLIC_GUILD_MESSAGES'
  
  # Protocol configuration
  onebot.v11:
    access_token: 'your_v11_token'
  onebot.v12:
    access_token: 'your_v12_token'

Configuration Fields

FieldTypeRequiredDescriptionDefault
appIdstringYesQQ Bot AppID-
secretstringYesQQ Bot Secret-
tokenstringYesQQ Bot Token-
modestringNoConnection mode: websocket (default) or webhookwebsocket
sandboxbooleanNoWhether sandbox environmentfalse
removeAtbooleanNoWhether to automatically remove @bot contenttrue
maxRetrynumberNoMaximum reconnection attempts (WebSocket mode only)10
intentsstring[]NoEvents to listen to (WebSocket mode only)[]

Intent Description

Intent is QQ official configuration, refer to the following table for values:

ValueDescription
GROUP_AT_MESSAGE_CREATEGroup @ event, comment if no group permission
C2C_MESSAGE_CREATEPrivate chat event, comment if no private chat permission
DIRECT_MESSAGEChannel direct message event
GUILD_MESSAGESPrivate bot channel message event, comment for public bot
PUBLIC_GUILD_MESSAGESPublic bot channel message event, comment for private bot
GUILDSChannel change event
GUILD_MEMBERSChannel member change event
GUILD_MESSAGE_REACTIONSChannel message reaction event
INTERACTIONInteraction event
MESSAGE_AUDITMessage audit event
FORUMSForum event
AUDIO_ACTIONAudio action event
AT_MESSAGES@ message event