Discord Integration
Add your agent to Discord servers using slash commands and direct messages.
Overview
Discord integration provides:
- Slash command support (
/ask) - Direct message conversations
- Server-wide availability
- Channel-specific responses
- Rich embed formatting
- Optional text-based DMs (no command prefix needed)
Prerequisites
- A Discord account
- Manage Server permissions on the target server
- Discord Developer Portal access
Setup Steps
1. Create a Discord Application
- Go to Discord Developer Portal
- Click New Application
- Enter a name (e.g., “My Support Bot”)
- Click Create
2. Get Your Credentials
From the Discord Developer Portal, collect these values:
| Field | Description | Where to Find |
|---|---|---|
| Application ID | Your Discord app’s ID | General Information page |
| Public Key | 64-character hex string for signature verification | General Information page |
| Bot Token | Secret token for your bot | Bot section → Reset Token |
| Guild ID (optional) | Server ID for instant command registration | Right-click server → Copy Server ID |
Keep your Bot Token secure — never share it publicly. Anyone with your token can control your bot.
3. Connect to Cuneiform Chat
- Go to Integrations in the sidebar
- Open the Discord card
- Enter your Application ID, Public Key, and Bot Token
- Optionally enter a Guild ID for instant slash command registration
- Click Connect
4. Configure Webhook URL (Required)
After connecting, you’ll see a success dialog with your Webhook URL:
- Copy the Webhook URL from the success dialog
- In Discord Developer Portal, go to General Information
- Find Interactions Endpoint URL
- Paste the webhook URL and click Save Changes
This step is required. Discord uses this URL to send slash command interactions to your bot.
5. Add Bot to Your Server
Use the Add to Server button on the integration card, or use the invite URL provided after connection. This adds the bot with the required permissions.
Using the Bot
Slash Commands
Users interact with your bot using the /ask slash command:
/ask What are your business hours?The bot processes the question and responds in the channel.
Direct Messages
Message the bot directly for private conversations:
- Find the bot in your server’s member list
- Right-click and select Message
- Use
/askcommand or enable Text DMs (see below)
Text DMs Toggle
The Text DMs switch on the integration card controls direct message behavior:
- Off (default): Users must use the
/askcommand in DMs - On: Users can send plain text messages in DMs (no command prefix needed)
When enabling Text DMs, you’ll need to enable Message Content Intent in Discord Developer Portal → Bot section → Privileged Gateway Intents.
Response Format
Responses are posted as plain text messages. Long answers are automatically split across multiple messages so they fit within Discord’s 2,000-character per-message limit.
Features
Server-Wide Access
Once added, the bot is available in all text channels where it has permissions.
Thread Support
The bot can respond in threads, keeping conversations organized.
Instant vs Global Commands
- With Guild ID: Slash commands register instantly in that server
- Without Guild ID: Global commands take up to 1 hour to propagate
Provide a Guild ID during setup for instant slash command availability. You can add more servers later.
Managing Your Bot
Each connected bot displays:
- Bot username and status (Active/Error)
- Application ID
- Associated agent
- Last activity timestamp
- Webhook URL (for reference)
Available Actions
| Action | Description |
|---|---|
| Add to Server | Opens invite link to add bot to a server |
| Portal | Opens Discord Developer Portal for this app |
| Copy URL | Copies the webhook URL |
| Test Connection | Verifies bot connectivity |
| Disconnect | Removes this integration |
Troubleshooting
Bot Not Responding
- Verify the Interactions Endpoint URL is configured in Discord Developer Portal
- Confirm bot has permissions in the channel
- Check the token is correct in Cuneiform Chat
- Test slash commands are registered (
/shows your command)
Commands Not Showing
Slash commands can take up to an hour to register globally. For immediate testing:
- Provide a Guild ID during setup for instant registration
- Wait for global propagation if no Guild ID was provided
Permission Errors
Ensure the bot has these permissions:
- Send Messages
- Use Slash Commands
- Embed Links
- Read Message History (for thread support)
Text DMs Not Working
- Verify Text DMs toggle is enabled on the integration card
- Enable Message Content Intent in Discord Developer Portal → Bot section
- Restart the bot connection if needed
Security
- Bot tokens are encrypted and stored securely
- Commands use Discord’s built-in signature verification
- No server data is accessed beyond direct interactions
Disconnecting
To remove the Discord integration:
- Go to Integrations in the sidebar
- Click the three-dot menu on your Discord bot
- Select Disconnect
To fully remove the bot from Discord:
- Go to your Discord server settings
- Navigate to Integrations → Remove the bot