Setup
- Create a bot at the Discord Developer Portal
- Enable the MESSAGE_CONTENT intent under Bot → Privileged Gateway Intents
- Copy the bot token from the Bot settings page
- Invite the bot to your server using the OAuth2 URL Generator (select
botscope withSend MessagesandRead Message Historypermissions)
Installation
Quick Example
DiscordConfig
Discord bot token from the Developer Portal.
Enable the MESSAGE_CONTENT privileged intent. Required to read message text.
Restrict the bot to specific server (guild) IDs. When
None, responds in all servers.Restrict the bot to specific channel IDs. When
None, responds in all channels.Whether to respond to messages from other bots.
When set, the bot only responds to messages starting with this prefix (e.g.,
"!").Timeout in seconds for the initial connection to Discord.
Maximum message length. Discord’s limit is 2000 characters. Longer responses are automatically split into multiple messages.
Features
- Guild and DM support — responds in server channels and direct messages
- Attachments — receives text, image, and audio files from users
- Reply context — includes the replied-to message for context
- Auto message splitting — long responses are split at sentence boundaries
- Typing indicator — shows “typing…” while the agent processes