Discord Integration
Ragpi's Discord integration allows you to easily connect your technical documentation and knowledge base with your Discord community. By deploying a Discord bot powered by Ragpi, users can ask questions and receive AI-assisted answers directly within Discord channels.
Setup Guide
1. Create a Discord Application
- Go to the Discord Developer Portal and log in.
- Click New Application, enter a name, and click Create.
2. Configure the Bot
- Navigate to the Bot tab.
- Under Privileged Gateway Intents, enable Message Content Intent and click Save Changes.
- Under Build-A-Bot, click Reset Token to generate a new token.
- Important: Save this token securely, as it will be used for the
DISCORD_TOKEN
environment variable.
- Important: Save this token securely, as it will be used for the
3. Set Up Installation
- Go to the Installation tab.
- Under Installation Contexts, deselect User Install.
- Under Default Install Settings, add the bot scope and click Save Changes.
- Copy the Install Link, paste it into your browser, and follow the steps to add the bot to your server.
4. Configure Your Server
- In Discord, create a new channel or use an existing one. I recommend creating a dedicated Forum Channel for the bot. To set up a forum channel, you will need to Enable Community in your server if you haven't already.
- Right-click on the channel and select Copy Server ID to obtain the channel ID.
- If you want the bot to operate in multiple channels, separate the channel IDs with commas in the
DISCORD_CHANNEL_IDS
environment variable.
5. Deploy Ragpi with Discord Integration
Refer to the Deployment documentation for instructions on deploying Ragpi with Discord integration.
Ensure that your .env
file includes:
DISCORD_TOKEN=your-bot-token
DISCORD_CHANNEL_IDS=your-channel-id(s)
important
By default, the bot will listen to messages in the specified channels and respond when mentioned using the @
symbol. If you want to allow the bot to respond to messages without being mentioned, set the DISCORD_REQUIRE_MENTION
environment variable to false
.
See Discord Configuration for a complete list of configuration options.