Powered by NovaDocs
Welcome to NovaDocsStart with Installation → Install with Docker, or switch language to Polish (PL).

Discord companion bot

Admin7 min readUpdated Aug 27, 2026

Discord companion bot

The Discord companion is an optional add-on (sold / downloaded separately from the main NovaDocs package). It lives next to your install in addons/novadocs-discord.

It connects to your live NovaDocs URL and answers support questions with the best matching published article. It never needs database access — only your site’s public search API.

What it does

  • /docs <query> — search your docs and return the best article (+ related links)
  • Support channel auto-reply — when someone asks a question in the configured channel, the bot searches and replies
  • @mention — @Bot how do I install? works anywhere in the support server
  • No match — asks them to wait for a human, and still links to the docs home

Requirements

  • Node.js 20+ (or Docker)
  • A running NovaDocs site (Docker, VPS, or Vercel)
  • A Discord application + bot user

1. Create the Discord bot

  1. Open the Discord Developer Portal → New Application
  2. Bot → Add Bot → copy the Token
  3. Enable Message Content Intent (Bot → Privileged Gateway Intents)
  4. OAuth2 → URL Generator
    • Scopes: bot, applications.commands
    • Permissions: Send Messages, Embed Links, Read Message History, Use Slash Commands
  5. Invite the bot to your support server with that URL
  6. Copy:
    • Application Client ID
    • Server (Guild) ID (Developer Mode → right-click server → Copy Server ID)
    • Optional: support channel ID (right-click channel → Copy Channel ID)

2. Configure

From the add-on folder:

bash
cd addons/novadocs-discord
cp .env.example .env
VariableRequiredDescription
DISCORD_TOKENyesBot token
DISCORD_CLIENT_IDyesApplication client ID
DISCORD_GUILD_IDyesSupport server ID
DISCORD_SUPPORT_CHANNEL_IDnoIf set, auto-answers questions in this channel
NOVADOCS_URLyesReachable NovaDocs URL (http://127.0.0.1:3000 locally, or your live https://… URL)
NOVADOCS_PROJECT_SLUGnoLimit search to one project (e.g. guide)
AUTO_REPLYnotrue / false (default true)
MAX_RESULTSno1–5 matches (default 3)
COOLDOWN_SECONDSnoPer-user cooldown in the channel (default 20)

3. Run

npm install
npm start

Slash commands register automatically on startup. To register only:

bash
npm run register

Important

Make sure NEXT_PUBLIC_APP_URL on the NovaDocs site matches the public URL you put in NOVADOCS_URL, so article links open correctly.

tip

Put the bot in #support / #help only (DISCORD_SUPPORT_CHANNEL_ID) so it does not chatter elsewhere. Use /docs when you want an explicit search.

  • Setting up webhooks — channel embeds when articles publish (different from this bot)
  • Full README inside the add-on package: addons/novadocs-discord/README.md

Was this helpful?