How arsenialiakseichyk/discord_bot works
Discord Music Bot: users issue slash commands to request YouTube or local tracks, which are queued, prepared, and played in a voice channel; playback status and controls are presented in Discord. Separate command branches manage voice channels, announcements, and custom embed construction. The queue, player, and shared state form the core runtime. Some command implementations were not sampled, so their documented capabilities are included with README-backed relationships; unsampled internal calls are omitted.
Main entry points: register.py Slash Command Registration · state.py Playback State · queue_manager.py Queue Processing · player.py Audio Player
Components 24
Bot Runtime
- Bot Application
bot.py - Slash Command Registration
commands/register.py - Bot Settings
config/settings.py
Music Commands
- Play Command
commands/music/play.py - Now Playing
commands/music/now.py - Queue View
commands/music/queue.py - Shuffle Queue
commands/music/shuffle.py - Clear Queue
commands/music/clear.py
Playback Core
- Queue Processing
core/queue_manager.py - Playback State
core/state.py - Audio Player
core/player.py - Playback Controls
ui/controls.py - Voice Connection
core/voice.py
Voice And Admin
- Join Voice
commands/utility/join.py - Join Specific Channel
commands/utility/jointo.py - Leave Voice
commands/utility/leave.py - Announcements
commands/utility/announce.py - Embed Builder
commands/utility/constructor.py - Help Command
commands/utility/help.py
External Services
- Discord Platform
- YouTube Metadata
utils/yt_utils.py - Local Music Files
- FFmpeg
Other components
- Discord User
Connections 42
- Discord User → Bot Application: uses commands
Readme.md - Bot Application → Slash Command Registration: registers commands
bot.py - Bot Application → Queue Processing: starts processing
bot.py - Bot Application → Playback State: uses state
bot.py - Bot Application → Bot Settings: loads settings
bot.py - Slash Command Registration → Play Command: registers
commands/register.py - Slash Command Registration → Now Playing: registers
commands/register.py - Slash Command Registration → Queue View: registers
commands/register.py - Slash Command Registration → Shuffle Queue: registers
commands/register.py - Slash Command Registration → Clear Queue: registers
commands/register.py - Slash Command Registration → Join Voice: registers
commands/register.py - Slash Command Registration → Join Specific Channel: registers
commands/register.py - Slash Command Registration → Leave Voice: registers
commands/register.py - Slash Command Registration → Announcements: registers
commands/register.py - Slash Command Registration → Embed Builder: registers
commands/register.py - Slash Command Registration → Help Command: registers
commands/register.py - Play Command → Voice Connection: connects to
commands/music/play.py - Play Command → Playback State: enqueues request
commands/music/play.py - Queue Processing → Playback State: updates queue
core/queue_manager.py - Queue Processing → YouTube Metadata: fetches metadata
core/queue_manager.py - Queue Processing → Bot Settings: reads music path
core/queue_manager.py - Queue Processing → Audio Player: starts playback
core/queue_manager.py - Audio Player → Playback State: reads playback state
core/player.py - Audio Player → YouTube Metadata: resolves audio stream
core/player.py - Audio Player → FFmpeg: prepares audio
core/player.py - Audio Player → Playback Controls: renders controls
core/player.py - Queue Processing → Playback Controls: refreshes controls
core/queue_manager.py - Audio Player → Discord Platform: plays voice audio
core/player.py - Voice Connection → Bot Settings: uses voice settings
core/voice.py - Voice Connection → Discord Platform: connects voice
core/voice.py - Playback Controls → Playback State: reads and updates
ui/controls.py - Now Playing → Playback State: reads playback details
commands/music/now.py - Queue View → Playback State: reads queue
commands/music/queue.py - Shuffle Queue → Playback State: shuffles queue
commands/music/shuffle.py - Clear Queue → Playback State: clears queue
commands/music/clear.py - Join Voice → Voice Connection: connects to
commands/utility/join.py - Join Specific Channel → Voice Connection: connects to channel
commands/utility/jointo.py - Leave Voice → Playback State: clears playback state
Readme.md - Announcements → Bot Settings: reads announcement settings
commands/utility/announce.py - Announcements → Discord Platform: publishes announcement
commands/utility/announce.py - Embed Builder → Discord Platform: publishes custom embed
commands/utility/constructor.py - Queue Processing → Local Music Files: checks local files
core/queue_manager.py