Inspiration
The recent events involving the shots fired in downtown Blacksburg were the impetus for the creation of this project. Discord served as a major platform for disseminating information about this incident while it was occurring, but much of this information was disorganized and sometimes contradictory. Our goal was to organize this information, creating a single source that server owners could easily add to their servers to get the most up-to-date information through an official source, VT alerts.
What it does
The VT Alerts Forwarding bot’s main goal is to ensure that Discord users can get an updated feed from VT alerts in their servers. To this end, the bot has two main ways of disseminating this information: a more traditional method, in which the user adds the bot to their server and configures it, and a method utilizing new Discord community features that allows server administrators to integrate the bot’s feed with their own announcements channels. This feature allows the user to stay entirely within the Discord ecosystem, and makes the bot accessible to users of all technical levels. The bot also uses commands to support the more traditional method of configuration, giving set-up instructions upon joining a server and utilizing a help command to ensure that this process is as straightforward as possible. It can also be used to get the most recent tweet from any Twitter account, ensuring that users can remain up-to-date even if they miss a message.
How we built it
We created the bot using repl.it in combination with integrated GitHub support for version control. It was coded in Python, with the Twitter API tweepy and the Discord API being utilized for their respective integration. We used threading in combination with tweepy to constantly watch a user’s stream for a new tweet, sending it to the channel of the user’s choice through the Discord API. By creating a community server with an announcement channel, the feed created by these tweets can be followed by anyone with the requisite permissions and streamed directly to their server. We also used Flask to create a server on our repl.it that is then pinged every 5 minutes by Uptime Robot, ensuring that our bot is hosted 24/7 on repl.it.
Challenges we ran into
Some of our biggest challenges were understanding and utilizing the Twitter and Discord APIs. While we had all previously worked with Python to some extent, none of us had practical experience with it, which made understanding the documentation of the APIs more difficult. We also had no prior experience with any type of server implementation, so identifying and implementing constant hosting of our bot was challenging. Additionally, our relatively minimal experience with repository platforms like GitHub and repl.it made utilizing them to the fullest a challenge.
Accomplishments that we're proud of
We were able to fully meet the goals we outlined for this project, an accomplishment that we are extremely proud of. We also overcame all the challenges we faced as a team, with each member contributing to the success of the overall project. Our end product was something everyone was happy with, and something that we believe will truly help the Virginia Tech community going forward.
What we learned
We are now much more confident in our use of the Discord and Twitter APIs, using their documentation to understand their application in the context of this project. Throughout this project we also all became much more comfortable with Python, as well as learned much more about the repository services we utilized. We also learned a lot about the use of Flask and successfully utilizing threads in our applications.
What's next for VT Alerts Forwarding Bot
For our next steps with this project, we hope to reach out to the administrators of local Virginia Tech community discord servers to implement our bot. We want to work with these users to identify the features that would benefit their communities and help to make them a part of our bot. We also want to increase the bot’s Twitter functionality, including more real-time information about a variety of topics useful to a VT student. These may include public transportation delays, important academic and social events on campus, and even where to find local covid-19 vaccine providers.
Built With
- discord
- github
- python
- repl
- tweepy
- uptime-robot
Log in or sign up for Devpost to join the conversation.