The Story
Not everything has to be enterprise. Sometimes you build things because your friends want to listen to music without ads on game night.
My friend group has a Discord server where we hang out most evenings — gaming, talking, the usual. We used to use one of the public Discord music bots, but they all either died (RIP Groovy, Rythm) or started requiring premium subscriptions for basic features like queue management. The free tiers were riddled with ads and limitations.
So I built our own.
What It Does
MicassoMozart is a Discord music bot that joins a voice channel and plays audio from YouTube. You send it a command with a song name or URL, it finds the track, and plays it. There’s a queue, skip, pause, volume control — the basics done well.
The one quality-of-life feature that mattered most to us: ad-free playback. The bot authenticates with YouTube Premium cookies, so it streams audio without ads — no mid-song interruptions during a raid. The cookies are loaded from a local store at startup and reused for the session, which keeps playback clean across a long evening of requests.
Technical Details
The bot is built with Node.js and Discord.js, which handles the Discord Gateway connection and voice channel management. On top of that sit the pieces that make playback feel reliable on a busy server:
- Voice connection management — joining the requester’s channel, holding the connection while a queue is active, and leaving cleanly once playback finishes or the channel empties out.
- Audio stream pipeline — resolving a YouTube source, piping it through audio processing, and feeding it into the Discord voice connection so playback starts quickly after a command.
- Queue management — an in-memory queue per server with add, skip, pause, resume, and volume, so requests stack up predictably during a session.
- Resilient error handling — gracefully skipping unavailable or age-restricted videos rather than letting a single bad link stall the whole queue.
What I’d Do Differently
If I rebuilt this today, I’d lean harder into the parts that aged worst. YouTube’s anti-bot measures and the churn in streaming libraries were the real maintenance cost over the bot’s life — a modern rebuild would isolate the source-resolution layer behind a clean interface so swapping the streaming library doesn’t ripple through the rest of the code. I’d also formalise the queue and voice-state handling that grew organically as feature requests came in.
Why It’s Here
This bot has been running on our server for years. It’s not complex engineering, and it’s not trying to be. It’s here because it represents something I value: building tools that make life marginally better for the people around you, even when there’s no business case for it.
Also, my friends would be offended if it wasn’t included.
Tech Stack
- Runtime: Node.js
- Discord: Discord.js
- Audio: YouTube source resolution piped into the Discord voice connection
- Hosting: Self-hosted, always-on for the friend group’s server