Discord Bot
Kapa can be installed as a bot on your Discord server. The bot allows users to ask questions in natural language about your product which improves developer experience as developers can find answers to their questions faster. The bot is fully customizable and can be configured to respond in specific forum channels or to direct mentions.
Check out the example deployments to see examples of how communities like NextJS, SST, and Astro use the kapa Discord bot to improve their developer experience.
1. Install Discord Bot 🖥️
Install the bot from this link to your server: Discord Bot Install Link
![Discord Install](/img/discord-install.png)
2. Choose Deployment Mode 🚀
There are two options to deploy kapa.ai: (1) Forum Auto-Reply Mode, or (2) Mention Mode.
Option 1: Forum Auto-Reply Mode (Recommended)
In this mode, kapa.ai auto-replies to every message in a #forum channel (examples: NextJS, Refine)
![Forum Post Auto-Reply](/img/discord-example-2.png)
Option 2: Mention Mode
In this mode, we create a new #bot-help or #ask-kapa channel where developers can @ mention the bot to answer questions (examples: Ionic, Langchain).
![Mention Mode](/img/discord-example-1.png)
We recommend Option 1 (Forum Auto-Reply Mode) as it tends to work better since users don't have to learn to explicitly tag the bot, but both options have been successful across production deployments.
When sharing your Server ID with us, please let us know which deployment mode you prefer.
3. Share your Discord IDs 💬
To enable the bot, please share the following IDs with us:
A. Server ID
To whitelist kapa for your server, you can find the Server ID here: Server Settings > Widget > Server Id
![Discord Server ID](/img/discord-server-id.png)
B. Channel ID(s)
To ensure the bot is only active in a single or a few channels in your server, you can find the Channel ID by right-clicking on the relevant channel and selecting Copy Channel ID
.
![Discord Channel ID](/img/discord-channel-id.png)
4. Start Using kapa.ai 🎉
Once the kapa.ai team has whitelisted your server, the bot is now live in your Discord!
As a final step, make sure you have access to the app.kapa.ai dashboard to view analytics and manage your project by reaching out to the team.
![Kapa App](/img/app-screenshot.png)
If you have any questions or need further assistance, don't hesitate to reach out to our team.
Troubleshooting 🛠️
Kapa Not Responding To Any Messages
If you encounter any problems, such as the bot not responding, there could be several reasons:
Private Threads Permission: The "Create Private Threads" permission might be turned off for the role of our bot.
To adjust this setting:
- Navigate to
Server Settings > Roles > Bot Role
- Scroll down to
Permissions
- Ensure the
Create Private Threads
permission is enabled for the bot role.
- Navigate to
Role Name Conflict: In some cases, Discord might auto-create a role with the "kapa.ai" name, which gets mentioned instead of the actual bot. This can cause confusion and prevent the bot from responding.
To resolve this:
- Go to
Server Settings > Roles
- Find the role named "kapa.ai"
- Rename this role from "kapa.ai" to "bot-help". By renaming the role, conflicts between mentioning a role and the bot should be eliminated.
- Go to
![Discord Bot Role](/img/discord-bot-help.png)
Kapa Follows Up With "Sorry, I Seem To Be Having Trouble"
If Kapa follows up with a message that says "Sorry, I seem to be having trouble", it might be due to the bot lacking the permission to post messages with embeds. This is often indicated by an error message like discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions
.
To resolve this:
- Check if you have disabled the "Embed Links" permission.
- If it's disabled, enable the "Embed Links" permission for the bot role.
![Discord Sorry Error](/img/discord-sorry.png)