Documentation Index
Fetch the complete documentation index at: https://arivu.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What the backend needs
The Discord adapter inintegrations/discord_adapter.py uses discord.py and supports both slash commands and message-based queries.
Required values:
DISCORD_BOT_TOKENortoken- Optional
DISCORD_GUILD_IDfor faster slash command sync - Optional
admin_user_idsfor approval gating - Enable the Message Content Intent in the Discord developer portal
What Discord users can do
Slash Commands
Use
/query to ask a question and /refresh to refresh schema.DM Queries
Send a direct message to the bot and get a response back in DM.
Prefix Queries
In a server, use the
!dh prefix for text queries when you do not want slash commands.Approvals and RLHF
Approve / Reject destructive SQL and capture 👍 / 👎 feedback with buttons.
Setup steps
Create a Discord application
Create a bot in the Discord Developer Portal.
Enable intents and permissions
Turn on Message Content Intent and grant bot permissions to send messages, read messages, use slash commands, add reactions, and read message history.
Set environment variables
Set
DISCORD_BOT_TOKEN and optionally DISCORD_GUILD_ID for quicker slash command syncing.Example
Backend behavior
- Session IDs are mapped as
discord:{user_id}. - Slash command
/queryruns a natural language query. - Slash command
/refreshrefreshes the schema cache. - DM messages and
!dhprefix messages route through the same pipeline. - Approval messages are delivered as Discord UI buttons.
- RLHF is stored via the 👍 / 👎 buttons on response messages.
Discord is a good fit when you want both server chat and DM support with a richer button-based experience.

