Chatspark
K
K

Discord

Deploy your AI agent as a Discord bot so users in your server can ask it questions using the /ask slash command directly in any channel.

10 min read

Updated September 2026

Overview

The Discord channel turns your ChatSpark AI agent into a Discord bot. Users in your server type /ask followed by their question in any channel where the bot is present, and the agent replies inline. This works through Discord's HTTP Interactions system, which does not require a persistent connection from ChatSpark.

Discord is popular with developer communities, gaming audiences, and tech-forward brands who use it as a primary community platform.

Discord Agent Type vs Discord AI Actions
This page covers the Discord Agent Type, where your agent lives inside Discord and responds to /ask commands from users. There is also a separate Discord AI Action, which allows your agent to post outbound messages to Discord channels as part of a workflow (for example, posting a lead alert when someone fills out a form on your website). These are two independent features. See the Discord AI Actions guide if you need the outbound capability.
Plan Requirement
The Discord channel is available on Pro and Enterprise plans only. Upgrade your plan from Settings before starting this setup.
Create Your Agent First
The Discord setup requires you to create and save your agent before configuring the Discord connection. The Interactions Endpoint URL that Discord needs is generated by ChatSpark and includes your agent ID. That ID only exists after the agent is saved for the first time. Follow the steps below in order.

Prerequisites

  • A Discord account
  • Access to the Discord Developer Portal
  • Permission to invite bots to your Discord server (Manage Server permission or higher)

Setup Instructions

Step 1: Create and Save Your Agent

  1. Go to AI Agents in your ChatSpark dashboard
  2. Click Create Agent
  3. In the Settings tab, find the AI Agent Type dropdown
  4. Select Discord
  5. Fill in your agent name and any other settings you want to configure
  6. Click Save to create the agent

After saving, the Discord Integration section in Settings will show your Interactions Endpoint URL. You will paste this into the Discord Developer Portal in a later step.

Step 2: Copy Your Interactions Endpoint URL

  1. Open your agent and go to the Settings tab
  2. Scroll to the Discord Integration section
  3. Copy the Interactions Endpoint URL shown there

Step 3: Create a Discord Application

  1. Go to the Discord Developer Portal
  2. Click New Application
  3. Give it a name (for example, your agent name or company name)
  4. Click Create

Step 4: Create a Bot and Get Your Token

  1. In the Developer Portal, go to the Bot section in the left sidebar
  2. Click Add Bot if prompted, or scroll to find the token section
  3. Click Reset Token to generate a new bot token
  4. Copy the token immediately. Discord only shows it once
Keep Your Bot Token Private
Your bot token gives full control over your Discord bot. Do not share it publicly or commit it to version control. If it is ever compromised, reset it from the Bot section of the Developer Portal and update it in ChatSpark.

Step 5: Add the Bot Token to ChatSpark

  1. Go back to your agent in ChatSpark and open the Settings tab
  2. Scroll to the Discord Integration section
  3. Paste your bot token into the Bot Token field
  4. Click Save

Step 6: Set the Interactions Endpoint URL in Discord

To allow Discord users to use the /ask command, you need to register your Interactions Endpoint URL with Discord.

  1. In the Discord Developer Portal, go to General Information in the left sidebar
  2. Find the Interactions Endpoint URL field
  3. Paste the URL you copied from ChatSpark in Step 2
  4. Click Save Changes

Discord sends a verification request to the URL when you save. ChatSpark responds automatically with the correct verification response, so the save succeeds right away.

Verification Happens Automatically
Discord pings your Interactions Endpoint URL to verify it is valid before saving. ChatSpark handles this verification response automatically. If the save fails, confirm the URL was pasted correctly without any extra spaces.

Step 7: Invite the Bot to Your Server

  1. In the Developer Portal, go to OAuth2 in the left sidebar
  2. Under OAuth2 URL Generator, select the bot and applications.commands scopes
  3. Under Bot Permissions, select Send Messages and Read Message History
  4. Copy the generated URL and open it in your browser
  5. Select your server and click Authorize

Once authorized, the bot appears in your server. Users can now type /ask your question here in any channel where the bot is present.

How It Works

When a user types /ask in your Discord server, Discord sends the interaction to your ChatSpark Interactions Endpoint URL. ChatSpark processes the message through your agent and returns the response. Discord displays it inline in the channel. This uses Discord's HTTP Interactions system, so ChatSpark does not need a persistent WebSocket connection.

Troubleshooting

The Interactions Endpoint URL field is empty

The URL is only generated after your agent has been saved. Make sure you have filled in the agent name and clicked Save before trying to copy the URL.

Discord could not verify the Interactions Endpoint URL

Confirm the URL was copied exactly as shown in ChatSpark with no trailing spaces or missing characters. If the problem persists, re-save your agent in ChatSpark and copy the URL again before retrying in Discord.

The /ask command does not appear in the server

Make sure the bot was invited with the applications.commands OAuth2 scope included. If you invited it without that scope, remove the bot from the server and re-invite it using the OAuth2 URL Generator with both bot and applications.commands selected.

Bot is in the server but not responding to /ask

Confirm the Interactions Endpoint URL in the Discord Developer Portal matches the one shown in your ChatSpark agent settings. Also check that your agent has training data and has been saved successfully.

Bot token is invalid

Go back to the Bot section of the Discord Developer Portal and reset the token. Copy the new token and update it in your ChatSpark agent settings, then save.

Discord AI Actions
If you want your agent to post messages to Discord channels proactively (for example, sending a notification when a lead is captured), see the Discord AI Actions guide. This is configured separately from the Discord Agent Type covered on this page.

Previous

Slack

Next

Launcher Styles