Skip to main content
The Discord integration is trigger-based — your Discord bot receives events (slash commands, modal submissions, message components) and Guild routes them to your agent. The agent’s response is returned back to Discord.

Authentication

  • Type: Discord Bot token

Setup

1

Open Credentials

Go to Credentials in Guild.
2

Connect Discord

Click Discord and paste your Discord bot token.
3

Add the bot to your server

Invite the bot to your Discord server using the OAuth2 URL from the Discord Developer Portal.

Usage

No SDK tools are imported for this integration. Configure a Guild trigger with the Discord integration to route events to your agent. When Discord sends an event to Guild, the payload is passed to your agent as the trigger input. Your agent’s response is returned to Discord as the reply.
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that responds to Discord slash commands",
  systemPrompt: `You respond to questions from Discord users.
Keep your answers concise.`,
})