You are browsing as a guest. Sign up (or log in) to start making projects!

dook bot

  • 13 Devlogs
  • 16 Total hours

Youtube music downloading focused discord bot with other random features.

Ship #1 Pending review

Hi! I made a youtube downloader music discord bot primarily for my friend group. I had previously attempted something two years prior and it was beloved, but it permanently died since a library I previously used was unmaintained and eventually couldn’t keep up with the youtube updates, and I didn’t really have any idea of what I was doing at the time.
This time, I’ve made a version that I like a lot more, and am quite proud of it. One notable feature is the ability to set a personal playlist, allowing for people to listen to each other’s playlists.
I struggled with motivation while making this project, as there was only a little bit of social pressure to finish it. You can tell since near the end of the project, I added some random geolocating features..
Anyway, thanks for reading, enjoy!

  • 13 devlogs
  • 16h
Try project → See source code →
Open comments for this post

1h 4m 4s logged

Prepared for shipping.
I figured working on this project got kind of repetitive and boring especially since I have significantly more fun projects coming up, so I decided to wrap this bot up.
I got rid of commented out unused code, and hid my api keys.
I also optimized some things, such as removing unnecessary logic. More importantly, I accidentally fixed an uncommon error that has randomly crashed the bot before, which somehow never got caught in my catch loops. This was because there was logic in the catch handler that caused it to crash again.
Anyway I’ll probably ship soon, enjoy

0
0
40
Open comments for this post

2h 23m 2s logged

Failed to add some commands, instead added some weird doxxing features
I’ve been dead for a bit as I was sick and also working on another more fun project, but I threw together a openstreetmap geolocating feature, along with a command that gets ssids based on an inputted latitude and longitude, courtesy of WiGle. A major issue was that there were extremely low rate limits (like in the ones digits every day), so I basically could only test it like a couple times every day.

0
0
10
Open comments for this post

18m 59s logged

Previously the play command couldn’t accept links, only search queries.
Now it can!!
I made it hard for myself because my code was spaghettified and I had to use some hacky methods to get around it.

0
0
50
Open comments for this post

19m 59s logged

Fixed a bug where it would play the wrong person’s playlist,.

I initially blamed the new feature to disable but it, turned out that I forgot to reset the queue upon running the playlist command.

0
0
16
Open comments for this post

28m 23s logged

I updated the playlist command to fix certain limitations.
Previously, I’ve been using youtube’s api.
Did I mention it sucks? It has an annoyingly low limit per day, along with providing limited information.
Anyway I hit my daily limit and decided to fix it.
I refactored the playlist command by switching to ytdlp-nodejs, which essentially does everything in much cleaner ways.

0
0
10
Open comments for this post

2h 30m 44s logged

Added a set playlist command.
This allows users to attach a youtube playlist url/id to themselves, so that the /playlist command can play an individual’s playlist. There is also the ability to play someone else’s playlist as long as they set one. I spent most of the time implementing a db.

0
0
15
Open comments for this post

47m 32s logged

Fixed the playlist command, added an embed to show current song, and added a skip command
All i had to do was wait for a yt-dlp update. In other words, my code fixed itself. Very fun

0
0
10
Open comments for this post

3h 6m 35s logged

Added half of a playlist command, which lets the user play a shuffled verision of someone’s youtube playlist.

It was quite annoying since google’s documentation still sucks imo.
Consequences of that include situations like me wasting half an hour because the docs told me to use id when the actual thing was supposed to be playlistId.

I also had issues with yt-dlp being partially outdated., causing 403s upon downloading videos. Guess I’ll just have to wait a little bit.

0
0
9
Open comments for this post

1h 58m 52s logged

Added the music player command to the bot.
It first downloads the video using yt-dlp and and then broadcasts it to a voice channel. I basically moved the search code from the previous devlog for this.

I did have some issues getting it to play music for the first time, since discord has some niche annoying feature that requires you to set the bot’s intents and i forgot to do that. Eventually, I got it working.

It came with some bugs related to file formatting, but they got fixed, and the bot should be working.

0
0
15
Open comments for this post

57m 38s logged

Added a feature to search for youtube videos.
Was a quick and easy api call, but Google’s documentation kinda sucks. I thought it was just me, but apparently internet people seem to agree. To quote one blog author, “Why has the YouTube API have to suck dongs?”
Anyway Google also gives you essentially no search calls a day (100/day), so to bypass that I grabbed a bunch of alts and spun up 5 or more keys which seemed like an appropriate and reasonable amount.

0
0
10

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…