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
- Go to discord.com/developers/applications and click New Application
- On the General Information page, copy the Application ID and Public Key
- Go to the Bot tab, click Reset Token, and copy the bot token
- Under Privileged Gateway Intents, enable Message Content Intent
2. Connect in Pillar
- Go to Agents in the dashboard
- Click Add Agent and select Discord
- Paste your Bot Token and Public Key
- 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.
| Setting | Description | Default |
|---|---|---|
| Respond to DMs | Process direct messages to the bot | On |
| Respond to Mentions | Process @mentions in guild channels | On |
| Channel Allowlist | Restrict the bot to specific channel IDs (comma-separated). Empty means all channels. | All channels |
| Thinking Reaction | Show a reaction emoji while the agent is processing | On |
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:
- User types
/pillar connect - Bot sends an ephemeral message with a link to your app's connect page
- User clicks the link, authenticates, and your backend confirms the link
- 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
- Identity Linking — Implement the
/connectbackend flow - Setting Up Tools — Configure tools for your agent
- Confirmation Flows — Ask users to confirm before executing actions