Skip to main content
Run Vaquill inside any Discord server. Members ask legal questions with !ask, the bot replies with cited cases and statutes, and per-channel history keeps follow-ups natural. Source code at github.com/Vaquill-AI/integrations/discord-bot.

Features

  • !ask, !starters, !reset, !help prefix commands (prefix is configurable)
  • Per-channel conversation history (cap configurable, default 20 exchanges)
  • “Show Sources” button on every response reveals cited case law and statutes
  • Long answers paginated with Previous / Next buttons
  • Starter-question buttons via !starters
  • Per-user and per-channel rate limits with optional Redis backend
  • Channel and role allowlists

Prerequisites

  • A Discord account with Manage Server permission on at least one server
  • Python 3.10+ (or Docker)
  • Vaquill API key (starts with vq_key_). See Authentication.

Platform setup

1

Create the application

Open the Discord Developer Portal, click New Application, name it (e.g. “Vaquill Legal AI”), and click Create.
2

Create the bot user and copy the token

In the sidebar, click Bot, then Add Bot > Yes, do it!. Click Reset Token, copy the value, and save it as DISCORD_BOT_TOKEN. You cannot view this token again after leaving the page.
3

Enable Message Content Intent (critical)

On the same Bot page, scroll to Privileged Gateway Intents. Toggle Message Content Intent on and click Save Changes.
Without Message Content Intent the bot cannot read message text and will silently ignore every command. This is the most common cause of “bot online but does nothing”.
4

Generate the invite URL

Go to OAuth2 > URL Generator.Under Scopes check:
  • bot
  • applications.commands
Under Bot Permissions check:
  • Send Messages
  • Embed Links
  • Read Message History
  • Use Slash Commands
  • Add Reactions
Copy the generated URL at the bottom of the page.
5

Invite the bot to your server

Paste the URL into your browser, select the target server, click Authorize, and pass the CAPTCHA. The bot will appear offline in your members list until you start it.

Quickstart

1

Clone and install

2

Configure

Fill in:
3

Run

On success you will see VaquillBot has connected to Discord!. In your server, try:

Configuration

Top env vars - see the repo’s .env.example for the full set.

Commands

Deployment

Docker

For Compose, create a minimal docker-compose.yml:
Then docker compose up -d.

Cloud hosts

Railway

railway init && railway up. Set DISCORD_BOT_TOKEN and VAQUILL_API_KEY in the Variables tab.

Render

New Web Service. Build: pip install -r requirements.txt. Start: python bot.py.

VPS + systemd

Run under a systemd unit with Restart=always. The bot does not need an open port.

Fly.io

fly launch, set secrets, fly deploy. Discord uses long-poll so no public URL is required.
Example systemd unit:

Troubleshooting

Slack

Slash commands and Socket Mode equivalent.

Telegram

Lightest setup - BotFather only.

Chatbots overview

Compare all six platforms.

Authentication

How Vaquill API keys work.