Discord
Connect Snippbot to Discord by registering a bot application and linking it to your server so agents can respond in channels and DMs.
Prerequisites
Section titled “Prerequisites”- 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)
-
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.
-
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
-
Set the Interactions Endpoint URL
In General Information → Interactions Endpoint URL, enter:
https://your-snippbot-url.com/webhook/discordDiscord will verify this endpoint on save. The channel adapter must be running for this to succeed.
-
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" -
Start the channel adapter
Terminal window snippbot channel start discord -
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.
- Scopes:
-
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
How it works
Section titled “How it works”The Discord adapter uses the Interactions API with Ed25519 signature verification. When a user sends a message in a bound channel:
- Discord POSTs the interaction to your Snippbot webhook URL
- The adapter verifies the Ed25519 signature using your Public Key
- The message is normalized and routed to the bound agent
- The agent generates a response, which is sent back via the Discord REST API
Verification
Section titled “Verification”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.
Access modes
Section titled “Access modes”| Mode | Who can use the bot |
|---|---|
open | Anyone in the channel |
allowlist | Only users on the approved list |
admin_only | Only users with admin role in the binding |
Manage the allowlist from Settings → Channels → Discord → Bindings → [Binding] → Access.
Slash commands
Section titled “Slash commands”After setup, register slash commands by running:
snippbot channel discord register-commandsThis registers a /snippbot command in your server. Users can type:
/snippbot What's the status of project Alpha?Troubleshooting
Section titled “Troubleshooting”Verification failed when saving Interactions URL
Section titled “Verification failed when saving Interactions URL”The adapter isn’t running or isn’t reachable. Check:
snippbot channel status discordcurl https://your-url.com/webhook/discordBot not responding in channel
Section titled “Bot not responding in channel”- Verify the binding exists for that channel ID
- Check adapter logs:
snippbot channel logs discord - Ensure the bot has
Send Messagespermission in the channel
Messages from bot users ignored
Section titled “Messages from bot users ignored”By design, the adapter ignores messages from bots (including itself) to prevent loops.