Inspiration
I've used Discord for a little over a year now, and bots are used for almost EVERYTHING. As a gamer, I can say that once I'm in the zone, I don't want to do much outside of my game. But with other Discord bots, I couldn't find the one that would meet my needs. I couldn't do multiple because the more bots I had, for some reason it would impact my network speed. So I decided when I came to the hackathon, you know what? I'm gonna build a freakin discord bot!
What it does
So far, it does SOME of the tasks that we originally had it mind. Currently, it can: play a song in the voice channel of your Discord server by using the command !play. It (so far) can only play songs from the Youtube link. It also can calculate the molar mass of any element with your given mass. In development, we have a text-based game that can be played with multiple discord players, as well as the bot being able to have conversations with it's own self learning algorithm.
How we built it
Ahem Google... no I'm just kidding. I went to discordapp.com and went to the Developers page. I then found a couple tutorials on basic discord.js programs and how to start writing in the discord.js API. After fooling around with it a bit, I broke off and started developing on my own, learning from my mistakes and looking for that ONE semicolon out of place. I learned new methods and functions that I could use from the documentation on discord.js.org. And...here we are!
Challenges we ran into
Oh my lord FREAKING VOICE CHAT. I had to figure out how to create commands that would take the audio off of Youtube and stream it into the voice chat the user was in. I literally was so frustrated, I was doing everything "right" and it wasn't working. Then I realized I couldn't just try to stream a link off the internet, and that discord wouldn't realize what I was talking about without a node that could stream it to my laptop so that I could stream that data into discord. And that was where ytdl-core came in.
Accomplishments that we're proud of
Being able to play songs from Youtube in voice chat. The system to do that....it took too long. I was genuinely concerned that I would be working on that right up until submission time.
What we learned
Ask for help! The internet is a really helpful place, and you can learn how to do a lot with it!
What's next for J.A.R.V.I.S - Discord Bot
Next? Oh a LOT of stuff. The text based game is in our immediate future, however, I'd also like to improve upon many features. For instance, instead of only a chemistry calculator, how about an TUTOR for EVERY SUBJECT that also includes my chatbot algorithm so it can tutor each student at their own pace? And, it's completely FREE! Cause, you know, Discord is completely free, so...yea. I'd also like to add Soundcloud player support and maybe even Spotify, although I'm not sure if their content is .mp3 online linked file accessible.
Built With
- discord
- javascript
Log in or sign up for Devpost to join the conversation.