Discord Bot - Modern Game Server Management
The PEON Discord Bot provides an intuitive, modern interface for managing game servers directly from Discord using slash commands.
⨠Fully Modernized (v3.0.0)
The Discord bot has been completely rewritten with Discord.py v2, featuring slash commands, enhanced UI, auto-completion, and persistent views.
đ Quick Start
Essential Commands
/peon # Main server interface
/create valheim bob # Create new server
/server start # Quick server actions
/list servers # View all servers
/help # Command reference
Channel-Based Management
PEON works intelligently based on your Discord channel:
- Admin channels: Full administrative controls
- Game channels (
game-servername): Server-specific controls - Any channel: Basic commands work everywhere
đ Complete Command Reference
Core Management
/peon [channel_type]
Main interface for server management
- Admin Mode: Full administrative controls
- Server Mode: Server-specific management
- Auto-detect: Smart channel detection
/create <game_type> <server_name> [description]
Create new game servers with auto-completion
/create minecraft survival-world
/create valheim viking-adventure description:Epic Viking server
/create palworld pals-paradise description:Creature collecting fun
Supported Games: Minecraft, Valheim, Palworld, ARK, CS2, Rust, Starbound, and 15+ more
/server <action> [server] [timer] [mode]
Quick server management commands
Actions:
- start - Boot up server
- stop - Shutdown server (with optional timer)
- restart - Quick restart
- info - View detailed server status
- update - Update server files
- backup - Create and download backup
/server start server:valheim.bob
/server stop server:minecraft.world timer:30m
/server update server:palworld.paradise mode:full
/server backup server:ark.island
/list <type>
View servers, orchestrators, and game plans
/list servers # All game servers
/list orchestrators # Registered orchestrators
/list plans # Available game types
đŽ Interactive Interface Features
Enhanced Server Controls
Server Management Panel: - đ Start - Instant server startup - đ Stop - Smart shutdown with timer options - đ Restart - Quick restart - đ Info - Real-time server status - âŦī¸ Update - Multi-mode updates (server/image/full/reinit) - đĻ Backup - One-click backup downloads
Advanced Features: - â° Timer Stops - Schedule shutdowns - đ Edit Description - Update server info - đī¸ Safe Deletion - Container-only or complete removal
Administrator Interface
Orchestrator Management: - đĸ Register - Connect new orchestrators - đī¸ Deregister - Remove orchestrators - đ Status Check - Health monitoring - đĻ Import Servers - Discover existing servers
Server Creation: - đī¸ Create Server - Full server deployment - đ Browse Plans - Explore available games - đ Update Plans - Refresh game catalog
⥠Advanced Features
Smart Auto-Completion
All commands feature intelligent auto-completion:
- Game Types: Suggests available games as you type
- Server Names: Shows your existing servers
- Timers: Common time formats (15m, 2h, 22:00)
- Update Modes: Available update options
Flexible Timer System
Schedule server actions with multiple time formats:
Duration Timers:
Specific Times:
22:30 # Today at 10:30 PM
2024-12-25.14:00 # Christmas at 2 PM
2024/12/25.14h00 # Alternative format
Examples:
/server stop timer:30m # Stop in 30 minutes
/server stop timer:22:00 # Stop at 10 PM today
/server stop timer:2024-12-31.23:59 # New Year's Eve stop
Update System
Update Modes:
- Server: Game files only (safest, fastest)
- Image: Container image update
- Full: Both game files and container
- Reinit: Complete reinstall (preserves saves)
/server update mode:server # Quick game update
/server update mode:full # Complete system update
/server update mode:reinit # Fresh install
Enhanced Error Handling
- Smart Error Messages: Clear, actionable error descriptions
- Troubleshooting Tips: Built-in help for common issues
- Connection Testing: Automatic orchestrator health checks
- Fallback Options: Graceful degradation when services unavailable
đ ī¸ Configuration & Setup
Bot Permissions
Required Discord permissions: - Send Messages - Basic communication - Use Slash Commands - Modern command interface - Embed Links - Rich message formatting - Attach Files - Backup downloads - Read Message History - Context awareness - Use External Emojis - Enhanced visual feedback
Permission Integer: 137443262464
Environment Variables
# Discord Configuration
DISCORD_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_server_id
DISCORD_ADMIN_CHANNEL_ID=admin_channel_id
# Orchestrator Connection
LOCAL_API_KEY=your_api_key
ORCHESTRATOR_URL=http://peon.orc:5000
# Optional Features
LOG_LEVEL=INFO
ENABLE_LEGACY_COMMANDS=false
Channel Setup
Recommended Channel Structure:
đ PEON Game Servers
đ§ peon-admin # Administrative controls
đŽ minecraft-survival # Minecraft server management
âī¸ valheim-adventure # Valheim server management
đž palworld-paradise # Palworld server management
đĸ server-announcements # Status updates
đ§ Troubleshooting
Common Issues
Bot not responding to slash commands
Solutions:
- Verify bot has "Use Slash Commands" permission
- Check bot is online in Discord member list
- Re-invite bot with updated permissions
- Restart bot container: docker restart peon-bot-1
Commands return 'No orchestrators registered'
Solutions:
- Use /peon admin â "Register Orchestrator"
- Verify orchestrator URL and API key
- Check orchestrator container is running
- Test connection: curl http://localhost:5000/api/v1/orchestrator
Server creation fails with 404 error
Solutions:
- Use /debug test_connectivity to diagnose
- Check available game plans: /list plans
- Verify game name spelling (use auto-completion)
- Check orchestrator logs for detailed errors
'Interaction failed' errors
Solutions:
- Commands must complete within 15 minutes
- For long operations, use Web UI instead
- Check Discord bot logs: docker logs peon-bot-1
- Verify stable network connection
Debug Commands
/debug test_connectivity # Test orchestrator connection
/debug list_plans # Show available game plans
Log Analysis
Bot Logs:
Common Log Patterns:
- Server create - Server creation attempts
- Response status: 404 - API endpoint issues
- Connection failed - Network problems
- Permission denied - Discord permission issues
đ Tips & Best Practices
Efficient Server Management
- Use Channel Names: Name channels
game-servernamefor automatic detection - Leverage Auto-completion: Start typing and let Discord suggest options
- Set Timers: Use scheduled stops to save resources
- Regular Backups: Download saves before major updates
- Monitor Status: Use
/server infoto check server health
Discord Organization
- Dedicated Categories: Group game channels together
- Clear Naming: Use consistent
game-servernameformat - Admin Separation: Keep admin commands in dedicated channels
- Announcement Channel: Share server status updates
- Role Permissions: Limit admin commands to trusted roles
Performance Optimization
- Resource Monitoring: Check server resource usage regularly
- Scheduled Updates: Update during off-peak hours
- Cleanup: Remove unused servers to free resources
- Efficient Restarts: Use restart instead of stop/start cycle
đ Migration from Legacy Commands
The bot automatically handles migration from old prefix commands (!command) to modern slash commands (/command).
Command Mapping
| Legacy | Modern | Notes |
|---|---|---|
!peon |
/peon |
Enhanced interface |
!get servername |
/server info |
Auto-completion |
!start servername |
/server start |
Faster execution |
!stop servername 30m |
/server stop timer:30m |
Improved timer parsing |
!plans |
/list plans |
Better formatting |
!getall |
/list servers |
Cleaner output |
Legacy Support
Legacy commands show helpful migration messages:
đ Command Updated!
This bot now uses Slash Commands for a better experience!
⨠Try /peon instead of !peon
đ Related Documentation
- Quick Start Guide - Deploy your first server
- REST API - Programmatic server management
- Web Interface - Browser-based management
- Supported Games - Complete game catalog