Discord
Discord integration uses the Bot API with a Gateway WebSocket connection — no public URL required.
What You Get
Section titled “What You Get”- DMs and guild (server) channel messages
- Streaming responses via message edits
- File attachments (images, audio, documents)
- Voice message transcription
- Reply threading
1. Create the Bot
Section titled “1. Create the Bot”- Open the Discord Developer Portal and click New Application
- Name it (e.g. “AI Butler”)
- Go to Bot in the sidebar → Add Bot
- Under Privileged Gateway Intents, enable:
- Message Content Intent
- Server Members Intent (optional, for user lookups)
- Copy the Bot Token — keep it secret
2. Invite the Bot to a Server
Section titled “2. Invite the Bot to a Server”In OAuth2 → URL Generator, select the scopes:
botapplications.commands(optional, for slash commands later)
Bot permissions needed:
- Read Messages / View Channels
- Send Messages
- Send Messages in Threads
- Attach Files
- Read Message History
- Add Reactions
Copy the generated URL and open it in your browser to invite the bot to a server you own.
3. Store the Token
Section titled “3. Store the Token”aibutler vault set discord_bot_token YOUR_BOT_TOKEN4. Enable the Channel
Section titled “4. Enable the Channel”configurations: channels: active: - discord5. Restart
Section titled “5. Restart”aibutler runLook for channel: discord adapter registered in the logs. The bot should show as online in your server.
Features
Section titled “Features”| Feature | Supported |
|---|---|
| Direct messages | Yes |
| Guild channels | Yes |
Mentions (@aibutler) | Yes |
| File attachments | Yes |
| Voice messages | Yes (transcribed via STT) |
| Streaming replies | Yes (message edits) |
| Thread replies | Yes |
| Reactions | Read-only |
| Slash commands | Not yet |
Troubleshooting
Section titled “Troubleshooting”Bot appears offline. Check that discord_bot_token is set correctly. The bot connects via Gateway WebSocket on startup — firewall rules blocking outbound WebSocket traffic will prevent this.
Bot sees messages but doesn’t respond. You likely haven’t enabled Message Content Intent in the Developer Portal → Bot settings. Without it, Discord sends empty message content.
Token leaked by accident? Regenerate it immediately in the Developer Portal. Discord auto-invalidates tokens that appear in public GitHub commits.