A Discord bot that tracks Roblox game player counts in voice channel names.
- Track multiple Roblox games across different Discord servers
- Auto-updates player counts every 6 minutes
- Custom display formats - personalize how player counts are shown
- Creates or uses existing voice channels
- Caches API requests to avoid redundant calls when multiple channels track the same game
- Install Go 1.25.5 or higher
- Copy
.env.exampleto.envand add your bot token:cp .env.example .env
- Run the bot:
go run main.go
-
Create a
.envfile with your bot token:BOT_TOKEN=your_discord_bot_token_here DEBUG=false
-
Start the bot:
docker-compose up -d
-
View logs:
docker-compose logs -f
-
Stop the bot:
docker-compose down
-
Build the image:
docker build -t roblox-stat-bot . -
Run the container:
docker run -d \ --name roblox-stat-bot \ -e BOT_TOKEN=your_token_here \ -v $(pwd)/config.json:/app/config.json \ --restart unless-stopped \ roblox-stat-bot
All /track commands require the "Manage Channels" permission.
/track add <universe_id> [channel] [channel_display]- Start tracking a gameuniverse_id- The Roblox Universe ID (required)channel- Existing voice channel to use (optional, creates new if not provided)channel_display- Custom display format using%dfor player count (optional, default:🎮 Playing: %d)- Examples:
Players: %d,🔥 %d online,Active: %d players
- Examples:
/track remove <channel>- Stop tracking a channel- Deletes the channel if created by bot
- Restores original name if using existing channel
/track list- Show all tracked games in the server/track update- Force update all channels in the server/help- Show help information about the bot (no permissions required)
The bot stores its configuration in config.json. This file persists tracker data and is automatically managed by the bot.
BOT_TOKEN- Your Discord bot token (required)DEBUG- Enable debug logging (optional, default: false)