How softwmv/discord-music-bot works
This self-hosted Discord music bot turns user slash commands into per-guild playback: the bot loads command cogs, music commands resolve tracks, and a GuildPlayer maintains an in-memory queue and drives voice playback. Configuration and guild settings are handled separately, with settings stored in SQLite. The README also documents utility and dice commands and auto-loaded command categories. The graph reflects the sampled source and documented capabilities; some command details and the music-to-settings persistence connection are not visible in the excerpts.
Main entry points: music.py Music commands · bot.py Bot runtime · commands.py Utility commands · fun.py Dice commands
Components 14
Bot runtime
- Bot runtime
bot.py - Cog loader
bot.py
Music playback
- Music commands
cogs/music.py - Guild player
cogs/music.py - Track resolver
cogs/music.py - Audio transcoding
cogs/music.py
Other commands
- Utility commands
cogs/commands.py - Dice commands
cogs/fun.py
Configuration and storage
- Environment config
config.py - Guild settings DB
db.py
Other components
- Discord users
- Discord platform
- yt-dlp
- Discord voice
Connections 18
- Discord users → Discord platform: invoke commands
README.md - Discord platform → Bot runtime: delivers events
- Bot runtime → Environment config: loads settings
bot.py - Bot runtime → Guild settings DB: connects and closes
bot.py - Bot runtime → Cog loader: loads extensions
bot.py - Cog loader → Music commands: loads cog
README.md - Cog loader → Utility commands: loads cog
README.md - Cog loader → Dice commands: loads cog
README.md - Discord users → Music commands: request playback
README.md - Music commands → Guild player: gets player
cogs/music.py - Music commands → Track resolver: resolves track
cogs/music.py - Track resolver → yt-dlp: extracts stream
cogs/music.py - Guild player → Audio transcoding: creates source
cogs/music.py - Audio transcoding → Discord voice: plays audio
README.md - Music commands → Discord voice: joins and controls
cogs/music.py - Music commands → Guild settings DB: persists settings
- Discord users → Utility commands: request status
README.md - Discord users → Dice commands: roll dice
cogs/fun.py