Writing a Discord music bot
2025-02-02
So, a new youtube blocking policy means that all of the music bots that i've been previously using no longer work.
It means that the music bot i've setup for my friends no longer works with youtube links, and.. it barely works with soundcloud links as well. I don't really need to write a new one from scratch, but I feel like programming something new today, and writing a music bot genuinely seems like an interesting problem for me to solve.
I'm choosing rust due to the amount of libraries it provides and because of how 'on-rails' the development experience seemed when writing > [onyx]. Complex features didn't seem difficult to implement, and this project is going to be mostly complex features.
So, what I need to do now is define a clear set of requirements:
On a base level, the program needs:
- To be CLI-based
- Take in an argument to a config file
- Make clean, consice outputs to the CLI
- To be able to parse said config file
- Cache media to save bandwidth and to dodge bot-blocking attempts
- Be able to support many a media source:
- plain HTTP(s)
- Soundcloud
- Spotify
- Youtube
- Have good playlist support
Here's what I don't want the program to have:
- A complex search scheme. People will just copy/paste links, otherwise they can just look it up on the internet.
Day one of development, Repository is initialized, I got a name thanks to a good suggestion from a friend, code-wise, for now I only have some basic starter code.
See: https://git.sr.ht/~nojusr/kentas
Incoming: > [changelog]