Search documentation

Search documentation

Discord

Deploy your agent as a Discord bot. It responds to @mentions in guild channels, direct messages, and slash commands. Responses are posted as Discord embeds with standard Markdown formatting.

Setup (BYOB)

Discord agents use the Bring Your Own Bot model. You create a Discord application, and Pillar connects to it using the bot token and public key.

1. Create a Discord application

  1. Go to discord.com/developers/applications and click New Application
  2. On the General Information page, copy the Application ID and Public Key
  3. Go to the Bot tab, click Reset Token, and copy the bot token
  4. Under Privileged Gateway Intents, enable Message Content Intent

2. Connect in Pillar

  1. Go to Agents in the dashboard
  2. Click Add Agent and select Discord
  3. Paste your Bot Token and Public Key
  4. Pillar validates the token and creates the connection

3. Set the interactions endpoint

After connecting, Pillar shows the Interactions Endpoint URL. Copy it and paste it into your Discord application's General Information > Interactions Endpoint URL field. Discord will send a verification ping — Pillar verifies the Ed25519 signature and responds.

4. Invite the bot

Use the invite URL shown in the dashboard (or construct one with your Application ID). Select your server and authorize. The bot needs bot and applications.commands scopes.

5. Register slash commands

Pillar can register slash commands automatically. Click Verify Connection in the dashboard to check that everything is wired correctly: bot token valid, message content intent enabled, guild accessible, and slash commands registered.

Channel settings

Configured in the dashboard under Agents > [your agent] > Channel Settings.

SettingDescriptionDefault
Respond to DMsProcess direct messages to the botOn
Respond to MentionsProcess @mentions in guild channelsOn
Channel AllowlistRestrict the bot to specific channel IDs (comma-separated). Empty means all channels.All channels
Thinking ReactionShow a reaction emoji while the agent is processingOn

Interaction modes

The bot responds to messages through several paths:

  • @mentions — Mention the bot in a channel and it replies in a thread
  • DMs — Send a direct message to the bot
  • Threads — Reply in an existing thread with the bot
  • Slash commands — Use /pillar ask <question> or /pillar connect

@mentions, DMs, and threads are handled by the Discord gateway (WebSocket). Slash commands are handled by the interactions endpoint (HTTP).

Identity

Discord does not provide user emails, so identity linking relies on the /connect slash command:

  1. User types /pillar connect
  2. Bot sends an ephemeral message with a link to your app's connect page
  3. User clicks the link, authenticates, and your backend confirms the link
  4. All future messages from this user include their external_user_id

See Identity Linking for the backend implementation.

Tool context

Like Slack, each tool can be restricted to DMs only or Public channels only in the Tools tab. Sensitive tools (account changes, billing) can be limited to DMs while keeping informational tools available in public channels.

Next steps