- Connects to Discord over the gateway with your own Discord application and bot
- Answers mentions in channels, every message in direct messages, and follow-ups in threads it already answers in
- Returns answers with SQL queries, data tables, and visualizations
- Posts a ”✨ nao is answering…” message and streams the answer into it as it grows
The Discord bot uses the same agent context, rules, models, and capabilities
as your web chat interface. Any improvements to your agent automatically
benefit Discord users.
Setup
Step 1: Create a Discord application and bot
- Go to the Discord Developer Portal and create a new application.
- From General Information, copy the Application ID and the Public Key.
- Open the Bot page, create the bot, and copy its token.
Step 2: Connect your Discord bot to nao
- In nao, open Settings -> Integrations & MCP -> Discord
- Fill in the required fields:
- Bot token
- Application ID
- Public key
- Optionally fill in:
- Trigger role IDs (comma separated): mentioning one of these roles also triggers the bot, not only mentioning the bot itself.
- Respond to channel IDs (comma separated): limit the bot to these channels. Leave it empty to answer in all channels.
- Fallback user email (community servers): messages from members who have not linked a nao account are answered as this user.
- Do not add the “Open in nao” link to answers: useful on community servers where members do not have access to nao.
- Click “Save”
Step 3: Add the bot to your server
Once saved, the Add to your server card shows an Add to Discord button and the invite link. Open it to invite the bot to a Discord server you manage, then mention it or send it a direct message.Step 4: Turn on the Stop button
Copy the URL from the Interactions Endpoint URL card and paste it into the Interactions Endpoint URL field of your Discord application’s General Information page. This adds a Stop button to the answer while nao is generating, so people can cut a long answer short. This step is optional. Everything except the Stop button works without it.Step 5: Choose the model
In the Settings card, pick the Model used to answer questions asked in Discord.Step 6: Account linking
Discord does not expose member emails, so accounts cannot be linked automatically by email.- When an unlinked member mentions the bot, it sends them a direct message with a link to connect their Discord account to nao. They open it, sign in, then ask their question again.
- If their direct messages are closed, they send
login <code>to the bot instead. Each user finds their code on the Discord settings page.
Admins configure the integration. Members with the Admin, Context admin, or
User role can use the bot. Members with the Viewer role cannot.
Usage
Ask Questions In a channel, mention the bot:- Process your question using the same agent as the web interface
- Generate SQL queries based on your context
- Execute queries against your connected databases
- Stream the answer into a single Discord message, editing it as the answer grows
- End the answer with an Open in nao link to the full conversation, unless the link is turned off
answer.md file.
Feedback
React to an answer with 👍 or 👎 and the vote is recorded in nao, the same as the thumbs in the web UI. Remove the reaction to remove the vote.
What’s Next?
Admin Setup
Configure authentication, models, and messaging integrations
Chat Overview
Learn how the main chat interface works