Discord
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:
- Go to Integrations and then click the Discord Bot button.
- Fill in the Name and select a bot or do a custom setup.
- 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.
- Go to your Discord application and navigate to "General Information" to find your "Application ID" and "Public Key".
- 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".
- Copy and save these three values - "Application ID", "Public Key", and "Bot Token".
We are back to ChatBotKit.
- Populate the "Application ID", "Public Key" and "Bot Token" fields with the values we collected from the previous step.
- 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. - Save the integration by clicking the "Save" button.
- 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.
- Go to your Discord application and navigate to "General Information".
- Paste the "Interaction Endpoint" URL into "Interactions Endpoint URL" field in Discord.
- 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:
If you have used a custom handle use that instead. For example:
Advanced Options
ChatBotKit's Discord integration offers several advanced options to help you customize your bot's behavior. Navigate to your Discord integration settings in ChatBotKit and expand the Advanced Options section to configure them.
- Ephemeral: Makes bot responses visible only to the user who triggered the command. Useful when you want to keep interactions private in a shared channel.
- Contact Collection: When enabled, the bot will collect contact details such as name and phone number from users it interacts with.
- Session Duration: Controls how long a conversation with your bot stays open. After this period expires, the next command starts a fresh conversation. By default, sessions last one day.
- Stream: Streams the bot's response word by word as it is generated. This improves perceived responsiveness. Enabled by default.
- Allowed Senders: Restricts which Discord users can interact with this integration. Enter one entry per line - Discord user IDs (17-18 digit snowflakes) or
@usernamehandles. Use*to allow all users, or leave empty to deny all.
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.