Bot doesn't respond to commands
Bot doesn't respond to commands
The most common causes are missing intents or undeployed slash commands.Check privileged intents:
In the Discord Developer Portal, go to Bot → Privileged Gateway Intents and confirm these are all enabled:For instant availability during development, use a guild-scoped deploy:Global commands can take up to one hour to propagate. Guild-scoped commands are available immediately.Check that the bot is running:
Look for a successful login line in the bot logs:If you see connection errors instead, check your
- Message Content Intent
- Server Members Intent
- Guild Voice States Intent
- Guild Message Reactions Intent
DISCORD_TOKEN value.Database connection errors
Database connection errors
If the bot fails to start with a database error, check your Common mistakes:For Docker Compose:
DATABASE_URL format:- Using
postgres://instead ofpostgresql://(both work, but verify your driver accepts it) - Wrong port — PostgreSQL defaults to
5432 - Database not yet created — connect with
psqland runCREATE DATABASE volvoxbot; - SSL mismatch — set
DATABASE_SSL=falseif your PostgreSQL server doesn’t have TLS configured
DATABASE_URL is automatically set to point at the internal db service. If you’re seeing connection errors in Docker, check that the db container is healthy:Redis connection errors
Redis connection errors
Redis is optional. If This is normal. The bot operates without Redis.If
REDIS_URL is not set, the bot logs:REDIS_URL is set but Redis is unreachable, you’ll see repeated connection error logs. The bot retries up to 10 times before giving up. Check:- Is Redis running? Run
redis-cli ping— it should respond withPONG. - Is the URL correct? Format:
redis://host:6379orredis://:password@host:6379 - Firewall rules — make sure port
6379is accessible from the bot
REDIS_URL is automatically set to redis://redis:6379. If Redis is unhealthy, the bot service won’t start because of the condition: service_healthy dependency.Permission errors
Permission errors
If the bot joins a server but can’t perform actions (e.g. can’t send messages, assign roles, or delete messages), check its role permissions in Server Settings → Roles.The bot needs at minimum:
- View Channels — to see channels and read events
- Send Messages — to respond to commands and AI mentions
- Read Message History — to fetch context for AI conversations
- Manage Messages — to delete messages (purge, auto-moderation)
- Add Reactions — for AI feedback thumbs and reaction roles
- Manage Roles — to assign and remove roles (reaction roles, temp roles)
The bot’s role must be positioned above any roles it needs to manage in the role hierarchy. Discord prevents a bot from assigning or removing roles that are higher than its own.
AI responses not working
AI responses not working
AI features require a valid Anthropic API key. If the bot isn’t responding to AI mentions or moderation isn’t running:
- Verify
ANTHROPIC_API_KEYis set correctly in.env. - Check the bot logs for Anthropic API errors — look for
401 Unauthorizedor429 Too Many Requests. - Confirm the channel is not in the AI channel blocklist (
config.ai.blocklist) and quiet mode is not active. - Verify the bot has the Message Content Intent enabled — without it, the bot can’t read message text.
CLAUDE_CODE_OAUTH_TOKEN and leave ANTHROPIC_API_KEY blank. Setting both causes conflicting authentication headers and the API will reject the request.Slash commands not showing
Slash commands not showing
If slash commands don’t appear after running
pnpm deploy:-
Wait — global command registration takes up to one hour. Run a guild-scoped deploy for immediate availability:
-
Check
DISCORD_CLIENT_ID— the deploy script needs this to be the correct application ID. Verify it matches the Application ID shown on your app’s General Information page. - Restart Discord — sometimes the client caches the command list. Fully quit and reopen Discord or use a browser.
-
Check scopes — the bot must have been invited with the
applications.commandsscope. Re-invite using the OAuth2 URL Generator if needed.
Dashboard login failing
Dashboard login failing
If you can’t log in to the web dashboard via Discord OAuth2, check these settings:Mismatches between this value and the actual URL cause NextAuth to reject the session.Discord OAuth2 redirect URI — in the Discord Developer Portal, go to OAuth2 → Redirects and add:This must exactly match
NEXTAUTH_URL must match the exact URL you’re accessing the dashboard from (including protocol and port):NEXTAUTH_SECRET must be set. Generate one with:DISCORD_REDIRECT_URI in your .env. Any mismatch causes Discord to reject the OAuth2 flow.DISCORD_CLIENT_SECRET — make sure this is the client secret, not the bot token. You can regenerate it on the OAuth2 → General page.High memory usage
High memory usage
If the bot process is consuming more memory than expected:
- Enable Redis — without Redis, the bot caches config and Discord API responses in memory. Setting
REDIS_URLmoves that caching to Redis and significantly reduces the Node.js heap size. - Check the performance monitor — the bot includes a built-in performance monitor. Look at the logs for memory and CPU metrics, or check the dashboard Performance section.
- Check conversation history — long-running channels accumulate conversation history. The bot trims history automatically, but very active channels may hold more context than others.
- Check for slow queries — the bot logs queries slower than
PG_SLOW_QUERY_MS(default 100 ms). Frequent slow queries can cause connection pool saturation and indirect memory growth.
Migrations fail or are out of order
Migrations fail or are out of order
The migration runner tracks applied migrations in the
pgmigrations table. If a migration fails mid-run:- Check the error output — it usually identifies the failing SQL statement.
- Fix the underlying issue (e.g. insufficient database permissions or missing extension).
- Run
pnpm migrateagain — already-applied migrations are skipped.
pg_trgm extension not found — migration 004_performance_indexes installs the pg_trgm extension. If your PostgreSQL user doesn’t have superuser privileges, this will fail. Connect as a superuser and run:pgcrypto extension not found — same issue as above for migration 006_command_usage. Run: