Discord
The Discord channel integrates Open Astra agents into your Discord server. Agents respond to direct messages and channel messages, support slash commands, and can use Discord's rich embed format for structured responses.
Setup
- Go to the Discord Developer Portal
- Create a new application and add a Bot to it
- Under the Bot tab, copy the bot token
- Enable Message Content Intent under Privileged Gateway Intents
- Invite the bot to your server with the
botandapplications.commandsscopes andSend Messages,Read Message Historypermissions - Add the token to your environment:
bash
DISCORD_BOT_TOKEN=your-bot-tokenConfiguration in astra.yml
yaml
channels:
discord:
enabled: true
defaultAgent: assistant-agent
allowedGuildIds: [] # Empty means all servers
allowedChannelIds: [] # Empty means all channels
mentionOnly: false # If true, bot only responds when @mentionedFeatures
- Slash commands — all shared channel commands are registered as Discord slash commands with autocomplete
- Thread replies — each conversation can optionally be contained in a Discord thread
- Rich embeds — structured data (tables, code blocks) is formatted as Discord embeds
- File attachments — files attached to messages are made available to the agent
- Streaming — responses are delivered progressively via message edits
Required bot permissions
| Permission | Required for |
|---|---|
| Send Messages | Delivering agent responses |
| Read Message History | Reading conversation context |
| Create Public Threads | Thread-based conversations |
| Attach Files | Sending file responses |
| Use Slash Commands | Registering slash commands |