Skip to main content

Discord

The discord channel connects to Discord Gateway via WebSocket to receive messages and sends replies through REST API. Supports both server channels and direct messages.

What it supports

  • receiving Discord messages
  • guild and DM scenarios
  • text message replies
  • slash command support

Quick Start

  1. Create Discord App and Bot

    Go to Discord Developer Portal and click New Application to create an app.

  2. Enable Privileged Intents

    In Bot settings, find Privileged Gateway Intents and enable:

    • Message Content Intent (required)
    • Server Members Intent (recommended)
  3. Get Bot Token

    On the Bot page, click Reset Token and copy your bot token.

  4. Generate Invite Link

    In OAuth2 URL Generator, add bot and applications.commands permissions, generate the invite link, and add the bot to your server.

  5. Configure MushroomAgent

    Set environment variable or config file to enable the Discord channel.

Config

channels:
discord:
enabled: true
bot_token: "xxx"

Environment variable:

  • DISCORD_BOT_TOKEN

Permission Requirements

Bot needs at least these permissions:

General Permissions:

  • View Channels

Text Permissions:

  • Send Messages
  • Read Message History
  • Embed Links
  • Attach Files

Good fit for

  • community bots
  • developer support channels
  • agent assistants in Discord DMs or channels