Skip to Content

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

  1. Go to Discord Developer Portal
  2. Click New Application
  3. Enter a name (e.g., “My Support Bot”)
  4. Click Create

2. Get Your Credentials

From the Discord Developer Portal, collect these values:

FieldDescriptionWhere to Find
Application IDYour Discord app’s IDGeneral Information page
Public Key64-character hex string for signature verificationGeneral Information page
Bot TokenSecret token for your botBot section → Reset Token
Guild ID (optional)Server ID for instant command registrationRight-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

  1. Go to Integrations in the sidebar
  2. Open the Discord card
  3. Enter your Application ID, Public Key, and Bot Token
  4. Optionally enter a Guild ID for instant slash command registration
  5. Click Connect

4. Configure Webhook URL (Required)

After connecting, you’ll see a success dialog with your Webhook URL:

  1. Copy the Webhook URL from the success dialog
  2. In Discord Developer Portal, go to General Information
  3. Find Interactions Endpoint URL
  4. 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:

  1. Find the bot in your server’s member list
  2. Right-click and select Message
  3. Use /ask command 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 /ask command 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

ActionDescription
Add to ServerOpens invite link to add bot to a server
PortalOpens Discord Developer Portal for this app
Copy URLCopies the webhook URL
Test ConnectionVerifies bot connectivity
DisconnectRemoves this integration

Troubleshooting

Bot Not Responding

  1. Verify the Interactions Endpoint URL is configured in Discord Developer Portal
  2. Confirm bot has permissions in the channel
  3. Check the token is correct in Cuneiform Chat
  4. 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

  1. Verify Text DMs toggle is enabled on the integration card
  2. Enable Message Content Intent in Discord Developer Portal → Bot section
  3. 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:

  1. Go to Integrations in the sidebar
  2. Click the three-dot menu on your Discord bot
  3. Select Disconnect

To fully remove the bot from Discord:

  1. Go to your Discord server settings
  2. Navigate to Integrations → Remove the bot
Last updated on