Skip to content

Discord Adapter Configuration

Discord adapter configuration guide.

Configuration Format

yaml
discord.{account_id}:
  # Discord platform configuration
  token: 'your_discord_bot_token'  # Required: Discord Bot Token
  intents:  # Optional: Gateway Intents
    - Guilds
    - GuildMessages
    - GuildMembers
    - GuildMessageReactions
    - DirectMessages
    - DirectMessageReactions
    - MessageContent
  partials:  # Optional: Partials
    - Message
    - Channel
    - Reaction
  presence:  # Optional: Bot status
    status: online  # online, idle, dnd, invisible
    activities:
      - name: 'Running onebots'
        type: 0  # 0: Playing, 1: Streaming, 2: Listening, 3: Watching, 5: Competing
  
  # Protocol configuration
  onebot.v11:
    access_token: 'your_v11_token'
  onebot.v12:
    access_token: 'your_v12_token'

Configuration Fields

FieldTypeRequiredDescriptionDefault
tokenstringYesDiscord Bot Token-
intentsstring[]NoGateway Intents, event types to receive[]
partialsstring[]NoPartials, partial data support[]
presenceobjectNoBot status and activities-

Required Intents

Depending on your bot's functionality, you may need to enable the following Privileged Intents:

  • PRESENCE INTENT - If you need to display member information in status
  • SERVER MEMBERS INTENT - If you need to get server member list
  • MESSAGE CONTENT INTENT - If you need to read message content (required for most bots)

Enable these in Discord Developer Portal.