> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> Trigger Guild agents from Discord slash commands and message interactions.

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

<Steps>
  <Step title="Open Credentials">Go to **Credentials** in Guild.</Step>
  <Step title="Connect Discord">Click **Discord** and paste your Discord bot token.</Step>
  <Step title="Add the bot to your server">Invite the bot to your Discord server using the OAuth2 URL from the Discord Developer Portal.</Step>
</Steps>

## 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.

```typescript theme={null}
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.`,
})
```
