About a week ago, we found out that SFHS was hosting a hackathon. From previous experience in hackathons, we wanted to make our idea planned and set before the hackathon. We started out with the idea to make one's experience in a discord environment easy and simplified. From there, we started to think about how we could do something like that. The primary method we found was creating a bot application for discord. After doing some more research and delving into our initial idea, we found 5 key things that we would want to address with our project. The first would be the lack of moderation in a discord server. In many discord servers, there are no clear limits on what people say and how it should be moderated, so the first thing we wanted to solve was the potential negativity in a discord environment. The second thing we wanted to do was assist the user in banning, kicking, muting, and even inviting people. More about how we did this below. The third challenge we wanted to tackle was making a user's experience fun on discord. This means that Astro would be able to share memes tell jokes, play games with you, and even more! Fourth, we wanted to add the functionality for people on discord to play music and jam out with their friends in a voice call, because who doesn't enjoy that! 5th we wanted to add the functionality for live data, this means being able to search the web, get covid data, weather data, and more... The final feature that we wanted to implement, and arguably the most important would be a myriad of productivity features. As Discord has grown older it has become more and more popular for not just gamers but also people looking to do work or communicate for a work environment. Given this, we set out to make Astro have the ability to set tasks, reminders, agendas, timers, and more! By doing all of this we can make discord an incredibly facile and feature-rich environment! The last thing that we developed in addition to Astro was a website that documents Astro and has a full list of its commands(some of these are in progress so might not work; we could not finish a few commands within the time limit). Our website is listed here: link
What it does
1) Negativity On Discord: We wanted to make discord environments less negative as a whole and incorporate a method of doing this into discord. We coded Astro to be able to delete messages containing blacklisted words by server moderators. In addition to this, we also included a profanity check using a python profanity API to scan for profanity in words in the case that there might have been a mistake in the parsing or a false flag of any message.
2) Moderation: Astro has the ability to do basic moderation features such as ban, kick, mute, and invite members.
3) Fun! To complete our goal of making Astro an all-in-one open-source(free to use) discord bot, it would be a necessity to add features that incorporate elements of fun or humor into a discord server. We did this with commands such as the Reddit command(parses subReddits for images and posts), the joke command(quirky programmer jokes), and tic-tac-toe!
4) Music Astro can play any song from youtube in a voice call, he can also create/manage a queue and skip songs.
5) Live Data: Astro has the ability to parse the web for various different things. Astro can return covid data for any state or country. He can tell you the time in any region. He can search google and Wikipedia for both links and top results. Lastly, he can tell you the weather for any place in the world.
6) PRODUCTIVITY This is where Astro can really help out in a discord server. Astro has a myriad of productivity commands that we have developed. He can do things like assign tasks to members of your discord, assign a taskboard to your whole team, summarize meetings, schedule events, poll opinions, and even more! This is one of Astro's most important commands as it is one of the things that makes Astro unique when compared to most other discord bots. In addition to that, this is the area where our team spent the most time developing, and it definitely paid off!
How we built it
Astro: Using the discord.py API and a multitude of different libraries we programmed Astro from scratch in python. We started off with a basic pseudo-code outline that highlighted what commands we would want to include for Astro, and then as we progressed we filled in each blank space with lines of code that completed the task. In addition to the discord.py API, we also utilized a flask server on the repl.it ide so our code could run on a VPS server on two threads. This makes it that Astro can be 24/7 hosted on our VPS with a server running too!
Website: Our website is made from a simple bootstrap template and then heavily modified. We made the decision to use a template since our team is most experienced in backend development, so we felt that it would be much easier to not have to create a website from scratch. Though our website started off as a basic template, it is drastically different from the design/flow all the way to the animations. It was developed in HTML/CSS/JS.
Challenges we ran into
We ran into a large number of challenges. Our team encountered a ton of bugs and we were forced to work our way through it or if it came down to it, drop certain features if necessary. One large challenge for both of us was music. In the music command, there are at least 7 different APIs/libraries being utilized all in one function so it leaves room for many bugs and errors in our code. On top of that, downloading and playing songs was extremely hard to get working because of various different errors and issues with convertors, libraries, versions, and more. Even though the music was extremely difficult it wasn't our only problem, we had to endure various different errors having to do with reading and writing JSONs, rendering HTML, setting up our server, the 30ish packages that we used, etc...
Accomplishments that we're proud of
1) Being able to complete so much in such a small amount of time. 2) The organization skills of our team and how efficiently we were able to plan, work, and code. 3) Our website. Our team is immensely proud of this as our primary area of expertise is coding on the backend. 4) Astro as a whole. We came into this hackathon with a goal and mindset that was solid, and due to that, Our team has accomplished a lot!
What we learned
We learned a lot from this project. We learned a lot about front-end development, discord as a platform, and creating bots as a whole.
What's next for ASTRO
Our team has a few upcoming ideas:
1) Building out more sections of the website to make a doc-like layout that publishes all the commands and their usage. 2) Creating more commands overall. 3) Refining our commands. 4) Creating a dashboard-like layout on our website where users can change their server's prefix, moderated words, commands, and more. This would bring a whole new level of customizability to discord bots.
## IMPORTANT(EXTRA NOTE) ##
One thing that I would want to add is that even though we did code this whole project from scratch, we would not be able to at all if it was not for the APIs and platforms that existed before Astro. One great example is the discord.py API and discord as a platform. Without the developments that discord has made to its platform and incredible bot APIs we would not be able to create Astro like we have done today. In addition to that, the 30 other packages/APIs/libraries we have used assisted us immensely too. So in essence, we are standing on the shoulders of giants and creating a project that is built on many things people have spent years working and building. Using these resources and knowledge we have managed to flip the script for discord bots and create a bot that can moderate, play music/games, make an environment more positive, and most of all make you more productive on discord.