Channels

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

  1. Go to the Discord Developer Portal
  2. Create a new application and add a Bot to it
  3. Under the Bot tab, copy the bot token
  4. Enable Message Content Intent under Privileged Gateway Intents
  5. Invite the bot to your server with the bot and applications.commands scopes and Send Messages, Read Message History permissions
  6. Add the token to your environment:
bash
DISCORD_BOT_TOKEN=your-bot-token

Configuration 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 @mentioned

Features

  • 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

PermissionRequired for
Send MessagesDelivering agent responses
Read Message HistoryReading conversation context
Create Public ThreadsThread-based conversations
Attach FilesSending file responses
Use Slash CommandsRegistering slash commands