Skip to content

Discord

Connect Snippbot to Discord by registering a bot application and linking it to your server so agents can respond in channels and DMs.

  • A Discord account with server admin permissions
  • Snippbot daemon running and accessible from the internet (for webhook delivery)
  • A public URL for your Snippbot instance (e.g., via reverse proxy)
  1. Create a Discord Application

    Go to discord.com/developers/applications and click New Application.

    Give it a name (e.g., “Snippbot”), then go to the Bot section and click Add Bot.

  2. Collect credentials

    From the Developer Portal, collect three values:

    • Bot Token: Bot section → Reset Token → copy
    • Public Key: General Information → Public Key
    • Application ID: General Information → Application ID
  3. Set the Interactions Endpoint URL

    In General Information → Interactions Endpoint URL, enter:

    https://your-snippbot-url.com/webhook/discord

    Discord will verify this endpoint on save. The channel adapter must be running for this to succeed.

  4. Store credentials in Snippbot

    Go to Settings → Channels → Discord and enter:

    • Bot Token
    • Public Key
    • Application ID

    Or via CLI:

    Terminal window
    snippbot channel set discord \
    --bot-token "Bot.Token.Here" \
    --public-key "abc123..." \
    --application-id "123456789"
  5. Start the channel adapter

    Terminal window
    snippbot channel start discord
  6. Invite the bot to your server

    In the Developer Portal → OAuth2 → URL Generator:

    • Scopes: bot, applications.commands
    • Bot Permissions: Send Messages, Read Message History, Use Slash Commands

    Copy the generated URL and open it in your browser to invite the bot.

  7. Create a channel binding

    In Settings → Channels → Discord → Bindings, click Add Binding:

    • Channel ID: the Discord channel ID (right-click channel → Copy Channel ID)
    • Agent: select which agent handles messages in that channel
    • Access mode: open / allowlist / admin_only

The Discord adapter uses the Interactions API with Ed25519 signature verification. When a user sends a message in a bound channel:

  1. Discord POSTs the interaction to your Snippbot webhook URL
  2. The adapter verifies the Ed25519 signature using your Public Key
  3. The message is normalized and routed to the bound agent
  4. The agent generates a response, which is sent back via the Discord REST API

Discord requires the Interactions Endpoint URL to respond with a valid PING response during setup. This is handled automatically by the adapter — you just need it running before saving the URL in the portal.

ModeWho can use the bot
openAnyone in the channel
allowlistOnly users on the approved list
admin_onlyOnly users with admin role in the binding

Manage the allowlist from Settings → Channels → Discord → Bindings → [Binding] → Access.

After setup, register slash commands by running:

Terminal window
snippbot channel discord register-commands

This registers a /snippbot command in your server. Users can type:

/snippbot What's the status of project Alpha?

Verification failed when saving Interactions URL

Section titled “Verification failed when saving Interactions URL”

The adapter isn’t running or isn’t reachable. Check:

Terminal window
snippbot channel status discord
curl https://your-url.com/webhook/discord
  1. Verify the binding exists for that channel ID
  2. Check adapter logs: snippbot channel logs discord
  3. Ensure the bot has Send Messages permission in the channel

By design, the adapter ignores messages from bots (including itself) to prevent loops.