Discord Bot Setup
Connect a Discord bot token and channel ID to Edictum for one-way approval notifications.
Right page if: you need the shipped Discord notification path in edictum-api. Wrong page if: you need interactive approve/block buttons in Discord -- those are not shipped today. Telegram is the only interactive channel. Gotcha: the current backend posts messages with a bot token and channel ID. It does not expose a Discord interactions endpoint.
Connect Discord to Edictum so approval notifications land in a Discord channel. This is a one-way notification channel today.
1. Create the Application
- Go to discord.com/developers/applications
- Click New Application > give it a name (e.g. "Edictum")
- On General Information, copy the Public Key -- you'll need this later
2. Create the Bot
- Left sidebar > Bot
- Click Reset Token > copy the token (
MTQ...) -- shown once, save it now - This is your
bot_token
3. Invite the Bot to Your Server
- Left sidebar > OAuth2 > URL Generator
- Scopes: check
bot - Bot Permissions: check
Send Messages - Copy the generated URL > open it in your browser > select your server > Authorize
4. Get the Channel ID
- In Discord > User Settings > Advanced > enable Developer Mode
- Right-click the channel where approvals should be posted > Copy Channel ID
5. Add the Channel in Edictum
- App > Settings > Notifications > Add Channel > Discord
- Fill in:
- Bot Token: from step 2
- Channel ID: from step 4
- Public Key: optional today; only keep it if you want the value stored ahead of future callback support
- Click Test -- a test message should appear in the channel
What Happens
When an agent requests approval:
- A message appears in your Discord channel with approval details
- The notification links operators back to the Edictum app
- The actual decision still happens in Telegram or the web UI
Discord does not ship interactive approve/block buttons in the current backend.
Validation
The current backend validates that bot_token is present and channel_id is numeric before saving the channel.
Troubleshooting
| Problem | Fix |
|---|---|
Test says Missing Access (code 50001) | Bot hasn't been invited to the server -- open the OAuth URL and authorize it |
Test says Missing Permissions | Bot lacks Send Messages in that channel -- check channel-level permission overrides |
| Bot token stopped working | You may have reset it -- copy the new token from the Bot page and update it in Edictum |
Test fails with discord channel_id must be numeric | Copy the raw numeric channel ID from Discord developer mode |
| You need buttons in Discord | Not shipped today. Use Telegram or the app for the actual decision |
Security Note
Treat the bot token like a password. If you accidentally share it (e.g. in a screenshot or chat):
- Go to Discord Developer Portal > Bot > Reset Token
- Copy the new token
- Update it in the Edictum app
The bot token is encrypted at rest in the reference stack database.
Next Steps
- Notification Overview -- routing filters and channel management
- Telegram Setup -- interactive approvals
- Slack Setup -- Slack notifications
Last updated on