Discord Troubleshooting
Discord Troubleshooting
Section titled “Discord Troubleshooting”This guide helps you resolve common issues with the Discord Module and provides solutions for various problems you might encounter.
🚨 Common Issues
Section titled “🚨 Common Issues”Bot Not Starting
Section titled “Bot Not Starting”Symptoms:
- Bot doesn’t appear online in Discord
- Console shows connection errors
- Commands don’t work
Solutions:
-
Check Bot Token
modules/discord/discord-bot.yml bot:token: "YOUR_BOT_TOKEN_HERE" # Make sure this is correct -
Verify Bot Permissions
- Ensure bot has proper permissions in Discord
- Check if bot is banned from server
- Verify bot is in the correct server
-
Check Network Connection
- Ensure server has internet access
- Check firewall settings
- Verify Discord API is accessible
-
Restart Bot
Terminal window /dcbot stop/dcbot start
Commands Not Working
Section titled “Commands Not Working”Symptoms:
- Slash commands don’t appear in Discord
- Commands show “unknown command” error
- Permission denied errors
Solutions:
-
Check Required Intents
- Go to Discord Developer Portal → Bot section
- Verify these intents are ENABLED:
- ✅ Server Members Intent
- ✅ Message Content Intent
- ✅ Guild Members Intent
- Click “Save Changes” if modified
-
Register Commands
Terminal window /dcbot registerWait a few minutes for Discord to update
-
Check Permissions
- Verify role IDs are correct
- Check if user has required roles
- Ensure role IDs are not role names
-
Verify Bot Status
Terminal window /dcbot status -
Check Command Cooldowns
- Wait a moment before retrying
- Check if command has cooldown period
Intent-Related Issues
Section titled “Intent-Related Issues”Symptoms:
- Bot appears online but commands don’t work
- “Missing Access” errors
- Role checking fails
- Bot can’t access member information
Solutions:
-
Enable Required Intents
- Go to Discord Developer Portal
- Select your application
- Go to “Bot” section
- Scroll to “Privileged Gateway Intents”
- Enable these intents:
- ✅ Server Members Intent
- ✅ Message Content Intent
- ✅ Guild Members Intent
- Click “Save Changes”
-
Restart Bot After Enabling Intents
Terminal window /dcbot restart -
Verify Intent Status
- Check bot status in Discord Developer Portal
- Ensure intents show as “Enabled”
- Wait a few minutes for changes to take effect
Permission Denied Errors
Section titled “Permission Denied Errors”Symptoms:
- “You don’t have permission” messages
- Commands not appearing for some users
- Inconsistent access
Solutions:
-
Check Role Configuration
modules/discord/discord-bot.yml Permissions:GetInfo: ["ROLE_ID_1", "ROLE_ID_2"] # Use actual role IDs -
Verify Role IDs
- Use Discord Developer Mode to get role IDs
- Right-click role → Copy ID
- Don’t use role names
-
Check Discord Role Hierarchy
- Ensure roles are in correct order
- Higher roles have more permissions
- Check role assignments
-
Test with Administrator Role
- Users with Administrator permission bypass all checks
- Use this to test if issue is role-related
Logs Not Appearing
Section titled “Logs Not Appearing”Symptoms:
- No log messages in Discord channels
- Missing event notifications
- Empty log channels
Solutions:
-
Check Channel IDs
modules/discord/channels.yml channels:kick_log: "CHANNEL_ID" # Use actual channel IDs -
Verify Bot Permissions
- Bot needs “Send Messages” permission
- Bot needs “Embed Links” permission
- Check channel-specific permissions
-
Check Logging Configuration
modules/discord/channels.yml enabled: true # Make sure logging is enabled -
Test Logging
- Perform a test action (kick, ban, etc.)
- Check if log appears in channel
- Verify embed formatting
Configuration Errors
Section titled “Configuration Errors”Symptoms:
- Bot fails to start
- Configuration validation errors
- Unexpected behavior
Solutions:
-
Validate Configuration
Terminal window /dcbot status -
Check YAML Syntax
- Ensure proper indentation
- Check for missing quotes
- Verify special characters
-
Reload Configuration
Terminal window /dcbot reload -
Reset to Defaults
- Backup current configuration
- Delete configuration files
- Restart server to regenerate
🔧 Debug Mode
Section titled “🔧 Debug Mode”Enable Debug Logging
Section titled “Enable Debug Logging”debug: enabled: true console: true file: true logging: trueDebug Information
Section titled “Debug Information”Debug mode provides detailed information about:
- Bot connection status
- Command processing
- Permission checks
- Configuration loading
- Error details
Debug Commands
Section titled “Debug Commands”# Check bot status/dcbot status
# Reload configuration/dcbot reload
# Restart bot/dcbot restart📊 Performance Issues
Section titled “📊 Performance Issues”High Memory Usage
Section titled “High Memory Usage”Symptoms:
- Server lag
- High memory consumption
- Bot becomes unresponsive
Solutions:
-
Restart Bot Regularly
Terminal window /dcbot restart -
Check Command History
- Clear old command history
- Limit command history size
-
Monitor Resource Usage
- Check server performance
- Monitor memory usage
- Check for memory leaks
Slow Response Times
Section titled “Slow Response Times”Symptoms:
- Commands take long to respond
- Delayed log messages
- Timeout errors
Solutions:
-
Check Network Connection
- Ensure stable internet connection
- Check Discord API status
- Verify server connectivity
-
Optimize Configuration
- Reduce command cooldowns
- Limit concurrent operations
- Check database performance
-
Monitor API Limits
- Check Discord API rate limits
- Implement proper rate limiting
- Monitor API usage
🛠️ Advanced Troubleshooting
Section titled “🛠️ Advanced Troubleshooting”Database Issues
Section titled “Database Issues”Symptoms:
- Commands fail with database errors
- Missing player data
- Inconsistent information
Solutions:
-
Check Database Connection
- Verify database is running
- Check connection settings
- Test database connectivity
-
Verify Data Integrity
- Check for corrupted data
- Validate player records
- Repair database if needed
-
Check Permissions
- Ensure database user has proper permissions
- Check table access rights
- Verify schema integrity
Discord API Issues
Section titled “Discord API Issues”Symptoms:
- Bot disconnects frequently
- API rate limit errors
- Inconsistent behavior
Solutions:
-
Check API Status
- Visit Discord API status page
- Check for known issues
- Monitor API response times
-
Implement Rate Limiting
- Add delays between requests
- Use proper error handling
- Implement retry logic
-
Update Dependencies
- Check for JDA updates
- Update Discord API version
- Verify compatibility
📋 Diagnostic Checklist
Section titled “📋 Diagnostic Checklist”Pre-Troubleshooting Steps
Section titled “Pre-Troubleshooting Steps”- Check server console for errors
- Verify bot is online in Discord
- Test basic commands
- Check configuration files
- Verify permissions
Configuration Checklist
Section titled “Configuration Checklist”- Bot token is correct
- Channel IDs are valid
- Role IDs are correct
- Permissions are properly configured
- Logging is enabled
Network Checklist
Section titled “Network Checklist”- Server has internet access
- Discord API is accessible
- Firewall allows connections
- No proxy issues
- DNS resolution works
🆘 Getting Help
Section titled “🆘 Getting Help”Information to Provide
Section titled “Information to Provide”When seeking help, provide:
-
Error Messages
- Full error text from console
- Screenshots of Discord errors
- Log file excerpts
-
Configuration
- Relevant configuration sections
- Permission setup
- Channel/role IDs (anonymized)
-
Environment
- Server version
- Plugin version
- Discord bot version
- Operating system
-
Steps to Reproduce
- What you were doing
- When the issue occurs
- How often it happens
Support Channels
Section titled “Support Channels”- Discord Server: https://discord.gg/2qCMn6KHj4
- Documentation: Check this guide for solutions
Log Files
Section titled “Log Files”Enable debug logging and provide:
- Console logs
- Plugin log files
- Discord bot logs
- Error stack traces
Still having issues? Join our Discord server for personalized support!