Integrations · Discord
A Guild agent handles every Discord interaction your bot receives and replies in the channel using its tools. Guild stores the bot token encrypted and injects it server-side so agent code never sees it. Every request’s signature is verified against your app’s public key before the agent runs, and credential policies let you restrict exactly which Discord operations each agent may call.
Book a demo
See how teams govern agents that use Discord.
Talk to sales
Get access to Guild, then connect Discord to your first agent.
What the Discord integration exposes
The integration provides tools to send, edit, and delete messages and interaction responses in Discord. Tools that address interactions, such as creating or editing a followup message, use the application ID and token from the agent’s input. Additional tools let the agent read channel details and list the guilds the bot has joined. Discord accepts interaction-addressed calls for 15 minutes after the interaction.How it works
1
Open Credentials in Guild
Go to Access & setup > Credentials. Guild stores the token encrypted and sends it to Discord server-side.
2
Paste the bot token
Click Connect, select discord, and paste the bot token from the Bot page of the Discord Developer Portal into the API Key field.
3
Create a Discord trigger
Add a trigger for interaction.command, interaction.component, or interaction.modal. Enabling the first trigger sets your app’s Interactions Endpoint URL to Guild automatically.
Why Discord bot access needs governing
Guild’s credential proxy enforces credential policies before any request reaches Discord, so you can write ALLOW and DENY rules that restrict agents to specific operations, such as posting followup messages but not deleting original responses. Rules can be scoped to a single agent or workspace, so one agent gets narrow posting rights while another reads channel details, all on the same connected token. Credentials can be scoped to an account, a single workspace, a member, or one agent, as described in Credentials. The bot token is stored encrypted and injected server-side; agent code never receives it. Guild’s security architecture keeps the credential out of the agent’s prompt, container, and state. An allow-all policy applies until you write scoped rules; deleting it moves the default to deny.About the Discord integration
The Discord integration runs a Guild agent when someone uses your Discord app: a slash command, a message component such as a button, or a modal submission. The integration isguildlabs~discord.
Authentication
- Type: Bot token
Setup
1
Open Credentials
Go to Access & setup > Credentials in Guild.
2
Connect Discord
Click Connect, select discord, and paste the bot token into API Key.
3
Add the bot to your server
Invite the bot to your Discord server with an OAuth2 URL from the Discord Developer Portal.
Trigger an agent from an interaction
The integration also lists two Discord webhook events,
webhook.application_authorized and webhook.entitlement_created. Guild registers only the app’s Interactions Endpoint URL, not a Webhook Events URL, so this page covers interactions.
Create a trigger in the web UI, or with the CLI:
{webhook_action} holds the command name, or the custom_id of the component or modal.
Tools
Tools in the latest published version ofguildlabs~discord:
The interaction tools, such as
discord_create_followup_message, address an interaction by the application_id and token in the agent’s input. A trigger with a custom input template includes them only if the template has {webhook_payload}. Discord accepts them for 15 minutes after the interaction. discord_edit_original_interaction_response replaces the “thinking” message Guild’s acknowledgement leaves.
Limitations
- Guild doesn’t post the agent’s answer back to Discord on its own. To reply in Discord, the agent calls a tool such as
discord_create_followup_message. - Enabling a trigger replaces any Interactions Endpoint URL the app already has, so connect each app in one place only.
- A trigger runs for every interaction of its event type. It can’t be narrowed to one command; the agent reads
data.nameto tell commands apart.
Frequently asked questions
Does Guild post the agent's answer back to Discord automatically?
Does Guild post the agent's answer back to Discord automatically?
No. Guild acknowledges each interaction with a deferred response so Discord shows the app is thinking, but the agent must call a tool such as discord_create_followup_message to send a reply. Discord accepts those calls for 15 minutes after the interaction.
Can I limit a trigger to one specific slash command?
Can I limit a trigger to one specific slash command?
Not yet. A trigger fires for every interaction of its event type. The agent reads data.name from the interaction payload to tell commands apart.
Can I connect separate bot tokens for different workspaces?
Can I connect separate bot tokens for different workspaces?
Yes. You can scope a credential to a single workspace from the workspace’s Credentials page, so that workspace uses a different bot token from the rest of the organization. See Credentials for all scoping options.
What happens to my existing Interactions Endpoint URL when I enable a trigger?
What happens to my existing Interactions Endpoint URL when I enable a trigger?
Enabling the first Discord trigger replaces whatever Interactions Endpoint URL your app already has with Guild’s endpoint. Connect each Discord app in one place only to avoid conflicts.
Put a governed agent on Discord this week
Book a demo
See how teams govern agents that use Discord.
Talk to sales
Get access to Guild, then connect Discord to your first agent.