Troubleshooting
Common issues and their solutions.
Bot Won't Start
Check Node.js Version
node -vMust be 16.x or higher. Recommended: 18.x or 20.x LTS.
Verify config.yml Syntax
node -e "const y = require('js-yaml'); const fs = require('fs'); y.load(fs.readFileSync('config.yml', 'utf8')); console.log('Valid YAML')"A malformed YAML file will throw a parse error. Check for:
- Incorrect indentation (YAML uses spaces, not tabs)
- Missing quotes around strings with special characters
- Invalid
${VAR}references without corresponding.enventries
Reinstall Dependencies
rm -rf node_modules
npm installRebuild After Changes
npm run buildIf you edited TypeScript source files, you must rebuild before starting.
No Music Playback
Is Lavalink Running?
curl http://localhost:2333/versionIf this fails, Lavalink is not accessible. Start it:
java -jar Lavalink.jarDo Credentials Match?
The auth in config.yml must exactly match the password in Lavalink's application.yml:
# config.yml
lavalink:
NODES:
- auth: "youshallnotpass"
# application.yml
lavalink:
server:
password: "youshallnotpass"Is the Bot in a Voice Channel?
The bot needs Connect and Speak permissions in the target voice channel.
YouTube Not Working?
YouTube may require the youtube-source plugin (opens in a new tab) with valid poToken configuration in Lavalink's application.yml. Check the plugin documentation for current requirements.
Database Connection Fails
Is the Database Server Running?
# MongoDB
mongosh --eval "db.runCommand({ ping: 1 })"
# MySQL
mysql -u root -p -e "SELECT 1"
# PostgreSQL
psql -U postgres -c "SELECT 1"Check Credentials
Verify the host, port, user, password, and database values in config.yml match your database server.
Check Firewall
Ensure the database port is accessible from the bot server. Common ports:
- MongoDB: 27017
- MySQL: 3306
- PostgreSQL: 5432
Dashboard Not Loading
Is the REST API Running?
Check the bot logs for:
Server running at port 2555If missing, verify features.RestAPI.enable is true in config.
Is the Frontend Running?
cd frontend
npm run devCORS Issues
Ensure DashboardUrl / FRONTEND_URL exactly matches the frontend URL (including protocol and port):
- Development:
http://localhost:3000orhttp://localhost:5173 - Production:
https://yourdomain.com
OAuth2 Not Working
Verify all four values match:
DiscordClientIdmatches your application's Client ID in the Discord Developer Portal.DiscordClientSecretmatches your application's Client Secret.DiscordRedirectUrimatches a redirect URI registered in Discord Developer Portal → OAuth2 → Redirects.- The redirect URI protocol matches (
httpvshttps).
Session Cookie Not Persisting
For production (cross-domain):
- Set
NODE_ENV=productionin.env - Ensure the API is behind HTTPS (required for
Securecookies) - Ensure
SameSite=Noneis working (requires HTTPS on both API and frontend)
Slash Commands Not Appearing
- Commands deploy automatically on bot start via
DeployService. - Global commands may take up to 1 hour for Discord's cache to update.
- To force-remove all commands:
Then restart the bot.
node scripts/clearSlash.js
Sharding Issues
Small Bots (< 2,500 guilds)
Use single shard:
bot:
SHARDING_SYSTEM:
shardsPerClusters: 1
totalClusters: 1Start with:
npm startLarge Bots (> 2,500 guilds)
Increase clusters:
bot:
SHARDING_SYSTEM:
shardsPerClusters: 2
totalClusters: 4Start with:
npm run start:shardsPremium / Patreon / Ko-fi Issues
Patreon
- Ensure
Patreon.Enableistrue. - Verify the
AccessTokenis a valid Creator Access Token. - Verify the
CampaignIdis correct (usenode scripts/getCampignId.js). - Check that the webhook URL points to your WebServer.
Ko-fi
- Ensure
KoFi.Enableistrue. - Verify the
VerificationTokenmatches your Ko-fi webhook settings. - Webhook URL format:
https://your-webserver-domain/kofi
Premium Not Showing on Dashboard
- Check the user's premium status via the API:
GET /api/user/premium - Verify
DASHBOARD_ACCESSconfig is set correctly. - Premium role: ensure
PremiumRole.GuildIdandPremiumRole.RoleIdare correct.
AI Chat Not Working
| Problem | Solution |
|---|---|
| "AI Chat isn't set up yet" | Add valid API key(s) to GeminiAiChat.ApiKeys in config |
| All models return 404 | Update Models list - check Google AI models (opens in a new tab) |
| Network errors | Verify server can reach generativelanguage.googleapis.com |
| Quota exceeded (429) | Add more API keys for automatic rotation |
| No song artwork | Verify server has internet access to api.deezer.com and itunes.apple.com |
| Chat history lost | Check database driver is working correctly |
| Access denied (403) | Check DASHBOARD_ACCESS.AiChat config |
Music Trivia Issues
| Problem | Solution |
|---|---|
| No audio during rounds | Some Deezer tracks lack previews - normal behavior |
| Session stuck | Restart bot or wait for timeout (5 min) |
| "Could not generate enough questions" | Try a different genre; the pool relaxes automatically |
| Questions repeat | Wait for monthly cleanup (25th) or clear MusicTriviaPreferences in DB |
| Last.fm personalization not working | Add ApiKey under features.WebServer.LAST_FM_SCROBBLED |
Log Files
Logs are written to the logs/ directory with daily rotation via Winston.
# View latest log (PowerShell)
Get-Content logs/*.log -Tail 100
# View latest log (Linux/Mac)
tail -100 logs/*.logEnable debug mode for verbose output:
bot:
DEBUG_MODE: trueCommon Error Messages
| Error | Cause | Fix |
|---|---|---|
TOKEN_INVALID | Invalid or expired bot token | Regenerate token in Discord Developer Portal |
DISALLOWED_INTENTS | Privileged intents not enabled | Enable all 3 intents in Developer Portal → Bot tab |
ECONNREFUSED on database | Database server not running | Start your database server |
No Lavalink nodes available | Lavalink not running or misconfigured | Start Lavalink; verify host/port/auth |
Port already in use | Another process using the port | Change port in config or stop the conflicting process |
Cannot find module | Build not run after code changes | Run npm run build |
EINVAL or YAML parse error | Malformed config.yml | Validate YAML syntax |
TimeoutOverflowWarning | Timer value exceeds 32-bit integer | This is handled internally; safe to ignore |