Skip to content

Discord Integration

Add your AI Bot Kit chatbot to a Discord server. Members can use the /ask slash command in any channel the bot has access to and get the same trained responses as your website widget.

What you need

  • A Discord server where you have Manage Server permission
  • Any AI BotKit plan — channel integrations are available on every plan: Free Full Access, Essential, Business and Enterprise

Create a Discord application

  1. Go to discord.com/developers/applications → New Application.
  2. Give it a name and click Create.
  3. Under Bot → Token, click Reset Token and copy the bot token.
  4. Under General Information, copy the Application ID and Public Key.
  5. Under Bot → Privileged Gateway Intents, enable Message Content Intent.

Connect to AI Bot Kit

  1. Open your chatbot → INTEGRATIONS → Discord.
  2. Paste the Bot Token, Application ID, and Public Key.
  3. Click Connect Discord.
  4. After connecting, you'll see steps to set the Interactions Endpoint URL and invite the bot to your server.
  5. In the developer portal, generate an OAuth2 invite link with bot and applications.commands scopes (and the Send Messages + Read Message History permissions). Use it to add the bot to your server.

When connected, you'll see:

  • Feature bullets:
    • Ed25519 verified -- Cryptographically secure interaction verification
    • Instant replies -- Your bot responds in real time
    • Any Discord server -- Works in any server you have access to

How members use it

In any channel where the bot has access:

/ask How do I reset my password?

The bot replies in the same channel with the AI-generated answer. The interaction is initially deferred (Discord's "thinking…" state), then edited with the final response — typically under 5 seconds.

What happens behind the scenes

  • Discord POSTs interaction events to /api/discord/callback. The handler verifies the Ed25519 signature using your Public Key.
  • The session ID is discord_<user-id> — per-user threads, not per-channel.
  • Replies are sent via Discord's REST API as interaction follow-ups.

Tips

  • Slash commands take time to propagate. After saving credentials, give Discord up to an hour to make /ask available globally.
  • Per-server toggling: the bot is on for every server it's added to. To exclude a server, kick the bot from it.
  • One application per chatbot. AI Bot Kit detects token reuse and asks you to confirm a transfer.

Limits

  • Every bot reply uses your message credits.
  • Discord enforces its own per-channel rate limits; AI Bot Kit defers replies to stay within them.