Learn how to easily integrate ChatBotKit with Discord and access a wide range of conversational AI functionalities directly within the popular messaging and collaboration platform for gamers and communities. Follow our step-by-step guide to get started.

With ChatBotKit, you can easily integrate powerful conversational AI technology with Discord, a popular messaging and collaboration platform for gamers and communities. By integrating with Discord, you can chat with your AI chatbot directly from within the platform, enabling you to access a wide range of conversational AI functionalities.

Step-by-step Guide

To integrate ChatBotKit with Discord, follow these simple steps:

  1. Go to Integrations and then click the Discord Bot button.
  2. Fill in the Name and select a bot or do a custom setup.
  3. Save the integration by clicking the "Create" button.

Once your integration is created you will need to setup your discord application. Go to Discord Developer Portal and click "New Application". Follow steps are require to setup the actual integration.

  1. Go to your Discord application and navigate to "General Information" to find your "Application ID" and "Public Key".
  2. Go to the "Bot" section and click "Reset Token" to obtain your "Bot Token". If there is no "Reset Token" button then you may need to add a bot first. Click the "Add Button".
  3. Copy and save these three values - "Application ID", "Public Key", and "Bot Token".

We are back to ChatBotKit.

  1. Populate the "Application ID", "Public Key" and "Bot Token" fields with the values we collected from the previous step.
  2. Optionally provide a handle, which is the slash command used for this bot. If you don’t provide a handle the discord slash command will be /discord.
  3. Save the integration by clicking the "Save" button.
  4. Copy the "Interaction Endpoint" URL. We will need this value next.

Now we are back to Discord Developer Portal to complete the final steps of the setup.

  1. Go to your Discord application and navigate to "General Information".
  2. Paste the "Interaction Endpoint" URL into "Interactions Endpoint URL" field in Discord.
  3. Save the application.

How to Interact with your Discord Bot

To start a new conversation with your chatbot, simply use the bot slash command (i.e /chatbotkit). For example:

/chatbotkit How is it going?

If you have used a custom handle use that instead. For example:

/mycustomhandle How is it going?

Advanced Options

ChatBotKit's Discord integration offers several advanced options to help you customize your bot's behavior:

  • Ephemeral: This option allows you to create ephemeral messages, which are only visible to the user who triggered the command. This is useful for sensitive information that you don't want to be visible to other users.
  • Session Duration: This option allows you to control how long a conversation with your bot can last. By default, sessions are set to last forever, but you can adjust this to suit your needs.
  • Streaming: This option allows you to stream the text from your bot. The response will appear in small chunks. Streaming is enabled by default.

To enable any of these options, simply navigate to your Discord integration settings in ChatBotKit and select the appropriate checkbox.

Troubleshooting

My discord command is not showing

There are two possible reasons why the discord command is not showing: additional setup may be required, or you may need to restart your browser or application. Please click the setup button and follow the instructions provided. If that does not work, try restarting your browser or application.

I am getting "Invalid application command"

This error may occur when your chatbot integration with Discord is not set up correctly. Click on the "Setup" button and then restart / refresh Discord. Alternatively please ensure that the interaction endpoint is also copied and configured in your Discord application

How do I troubleshoot other errors

Please take a few moments to review the Event Log located within the settings of your Discord integration. This comprehensive event log provides a detailed record of all the events that have occurred. It is a valuable resource for gaining insights into the activities and interactions happening within your Discord integration. By regularly reviewing the Event Log, you can stay informed and up-to-date on the various events taking place, allowing you to make informed decisions and take appropriate actions as needed.