Edictum
Reference API/App StackNotifications

Discord Bot Setup

Connect a Discord bot token and channel ID to Edictum for one-way approval notifications.

AI Assistance

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

  1. Go to discord.com/developers/applications
  2. Click New Application > give it a name (e.g. "Edictum")
  3. On General Information, copy the Public Key -- you'll need this later

2. Create the Bot

  1. Left sidebar > Bot
  2. Click Reset Token > copy the token (MTQ...) -- shown once, save it now
  3. This is your bot_token

3. Invite the Bot to Your Server

  1. Left sidebar > OAuth2 > URL Generator
  2. Scopes: check bot
  3. Bot Permissions: check Send Messages
  4. Copy the generated URL > open it in your browser > select your server > Authorize

4. Get the Channel ID

  1. In Discord > User Settings > Advanced > enable Developer Mode
  2. Right-click the channel where approvals should be posted > Copy Channel ID

5. Add the Channel in Edictum

  1. App > Settings > Notifications > Add Channel > Discord
  2. 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
  3. Click Test -- a test message should appear in the channel

What Happens

When an agent requests approval:

  1. A message appears in your Discord channel with approval details
  2. The notification links operators back to the Edictum app
  3. 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

ProblemFix
Test says Missing Access (code 50001)Bot hasn't been invited to the server -- open the OAuth URL and authorize it
Test says Missing PermissionsBot lacks Send Messages in that channel -- check channel-level permission overrides
Bot token stopped workingYou 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 numericCopy the raw numeric channel ID from Discord developer mode
You need buttons in DiscordNot 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):

  1. Go to Discord Developer Portal > Bot > Reset Token
  2. Copy the new token
  3. Update it in the Edictum app

The bot token is encrypted at rest in the reference stack database.

Next Steps

Last updated on

On this page