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
Create Discord App and Bot
Go to Discord Developer Portal and click New Application to create an app.
Enable Privileged Intents
In Bot settings, find Privileged Gateway Intents and enable:
- Message Content Intent (required)
- Server Members Intent (recommended)
Get Bot Token
On the Bot page, click Reset Token and copy your bot token.
Generate Invite Link
In OAuth2 URL Generator, add
botandapplications.commandspermissions, generate the invite link, and add the bot to your server.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