bot.py, but the runtime behavior is split across small, focused modules in cogs/, core/, and ui/. This structure makes it easier for you to extend one feature without touching unrelated playback logic.
What loads at startup
The bootstrap inbot.py now performs three simple jobs:
- Creates the Nextcord bot instance and loads the environment variables.
- Connects to the Lavalink node during
on_ready. - Loads the extension modules from
cogs/.
cogs.music_commandsfor slash commands, queue management, and playback controlscogs.eventsfor voice-state cleanup, track lifecycle updates, and presence sync
What each module owns
Why this layout helps you
You can now update a single command group or a single event listener without rebuilding the whole bot. If you add a new feature, place it in its own cog, wire it intobot.py, and keep the rest of the architecture untouched.
The modular layout is the foundation for future additions such as Moderation, Utility, or Admin cogs. Keep each feature isolated so the command set stays easy to maintain.
Related Topics
How the Music Bot Works
See how Nextcord, Wavelink, and Lavalink work together at runtime.
Queue View
Learn how the paginated queue browser is built and protected from other users.
Playback Commands
Review the slash commands that start, pause, skip, and stop playback.
Configuration
Map the settings in .env and application.yml to the runtime behavior you just read about.