Connect Discord
Discord answers through a slash command, not free-form chat. Paste the bot token and 64-character public key, then set the endpoint.
Browse topics
What it is
Discord is the one channel that does not work like a chat. Your community reaches the chatbot through a slash command — they type your command, add their question as its text, and the answer comes back in the channel. Free-form messages and ordinary DMs to the bot are not read.
That is not a limitation we chose lightly; it follows from how the integration is built. Agentency listens for Discord interactions over the web rather than holding an always-open connection to Discord, and interactions are what slash commands produce.
The card asks for two values from a Discord application you create: a Bot token and a Public key. The bot token lets Agentency post the answer; the public key lets Agentency check the signature Discord puts on every interaction. The public key is exactly 64 characters of hexadecimal, and the form will tell you if what you pasted is not.
Discord goes Connected the moment your credentials check out, but it will not receive anything until you paste Agentency's Callback URL into your application's Interactions Endpoint URL.
When you would use it
Use this for community servers, game or product Discords, and support servers where members would rather ask in the channel than open a ticket.
Where to find it
Open Dashboard → Chatbots → your chatbot → Integrations → Messaging and click the Discord card.
Steps
- In the Discord Developer Portal, create an application and add a Bot to it. The drawer's View official setup guide link goes to Discord's interactions documentation.
- Copy the Bot token from the Bot tab. Copy the Public key from the General Information tab.
- Register a slash command for the application, and give the command one text option — that option is where the member's question goes. A command with no text option will send an empty question and produce nothing useful.
- In Agentency, open Integrations → Messaging → Discord, paste the bot token and the public key, and press Connect. Agentency checks the token with Discord before saving.
- Copy the Callback URL from the panel that appears.
- Back in the Developer Portal, paste it into Interactions Endpoint URL and save. Discord immediately sends a signed test ping to that address and refuses to save the field if the answer is not correctly signed — which is why this step only works after you have connected here and with the matching public key.
- Invite the bot to your server if you have not already, then run your slash command in a channel.
- Confirm the answer appears, and check the thread in Conversations.
What you will see
The connect form has four numbered steps, the official-guide link, and a note explaining the slash-command model and that free-form DMs are not supported.
Once connected, the badge reads Connected, the panel shows Connected as followed by your Discord application's name, and the warning panel One last step displays the callback URL with a copy button. Test connection and Disconnect are in the footer; Test connection re-checks the bot token with Discord, not your endpoint setting.
In Discord itself, a member who runs the command sees the bot "thinking" first. Agentency acknowledges the interaction straight away, because Discord demands a response within a few seconds, and then edits in the real answer once the chatbot has composed it. A couple of seconds of "thinking" is normal and healthy.
How replies behave
Long answers are split into Discord-sized messages, so a detailed answer can arrive as several posts. Questions longer than about 2,000 characters are trimmed before the chatbot reads them.
Each answer spends message credits at your chatbot's live model rate (1X = one credit; see Message credits). If the workspace is out of credits, members get a short out-of-credits reply instead of an answer. If the chatbot is paused, the command produces nothing — see Activate or pause a chatbot.
Limits and plan notes
Discord requires a plan with integrations, messaging enabled for this deployment, an Active chatbot, and a free slot under the per-chatbot connected-app cap. Messaging channels availability explains each gate.
Both credentials are stored encrypted and never displayed again. Reconnecting replaces them and does not consume a second slot. Disconnecting stops answers at once and clears the stored values, but the Interactions Endpoint URL stays in your Discord application until you remove it — and a saved endpoint that no longer answers will make Discord show errors on your command, so clear it if you are done.
Common problems
Discord will not save my Interactions Endpoint URL.
Discord tests the address with a signed ping before accepting it. If the public key stored here is not the one from this same application, the test fails and Discord rejects the URL. Reconnect with the correct public key, then paste the URL again. Also make sure you copied the whole URL.
The command runs but the bot never answers.
Check, in order: the chatbot is Active; the Interactions Endpoint URL is saved; and your command actually has a text option. An interaction with no text option carries no question.
I sent the bot a DM and nothing happened.
Expected. Use the slash command. Free-form direct messages are not read on this channel.
The form rejects my public key.
It must be the 64-character hexadecimal application public key, not the bot token, the client secret, or the application ID.
The bot answered once, then went quiet.
Usually a regenerated bot token. Press Reconnect and paste the current token.
The answer arrives as several messages.
That is normal for long answers — Discord caps how much fits in one message.
Common questions
Why can members not just DM the bot?
Replies run through Discord's interactions model, which means a slash command. Free-form direct messages are not read.
My slash command returns nothing.
The command needs one text option to carry the question, the interactions endpoint must be saved, and the chatbot must be Active.
Discord refuses to save my Interactions Endpoint URL.
Discord tests the address with a signed ping. A public key that does not match this application makes that test fail.
Why does the bot say it is thinking first?
Discord needs a response within seconds, so the command is acknowledged immediately and the real answer is edited in after.
What exactly is the public key?
A 64-character hexadecimal value from your application's general information. It is not the bot token or the client secret.
Was this article helpful?
Related articles
Connect Slack
Slack needs a bot token starting with xoxb- and a signing secret, then your callback URL pasted into Event Subscriptions.
Other messaging apps
Ten apps share one grid, one connected-app cap, and three post-save patterns. Pick a platform here, then follow its own guide.
Messaging channels availability
Three conditions decide whether a messaging app can connect: your plan, the deployment rollout, and the platform itself.
Chatbot readiness
Two independent lights: active versus draft, and trained versus not. Visitors need the first; good answers need both.
Ready to try it on your own content?
Create a free workspace, add a document, and ask the questions your team is tired of answering.