How lordm121/roulette-discord-bot works
This is a Discord roulette-game bot. Players start a lobby with a slash command, join or leave through buttons, then the bot runs timed rounds: a wheel selects a player, who chooses someone to remove; the final player wins. The sampled code shows the Discord interaction handler coordinating game state, timing, and wheel rendering. The README is empty, and omitted portions of index.js limit visibility into some round and winner details.
Main entry points: index.js Interaction handler · wheel.js Wheel image generator · utils.js Button helpers · config.json Timing configuration
Components 8
Discord interface
- Interaction handler
index.js - Button helpers
utils.js
Roulette game
- Game state and rounds
index.js - Timing configuration
config.json
Wheel rendering
- Wheel image generator
wheel.js - Wheel assets
assets
Other components
- Players
- Discord
Connections 7
- Players → Discord: use commands
- Discord → Interaction handler: delivers interactions
index.js - Interaction handler → Discord: sends game messages
index.js - Interaction handler → Timing configuration: reads timing
index.js - Interaction handler → Button helpers: edits buttons
index.js - Interaction handler → Wheel image generator: requests image
index.js - Wheel image generator → Wheel assets: loads fonts and pointer
wheel.js