Inspiration
One of our members, Alexander, is an executive member of Dragon Boat Z, an organization with over 160 members that manages close to 50 000$ a year. Year after year, they are getting more and more members to join their club, so physically managing practice schedules and giving all members equal opportunities becomes increasingly difficult since practice spots are limited. We created a Discord bot to help manage their Discord server/channel and counteract this.
What it does
The bot allows users to register and unregister for practices by reacting to an automated message. It also sends a message to those on the waitlist for the previous practice, allowing them to sign up for the next practice before the bot makes the registration live for everyone.
How we built it
We used a Rust backend to ensure our requests were performed quickly and to practice using Rust further. For simplicity, the backend was connected to a MongoDB database. The practice registration methods were automated in the backend using cronjobs. The commands and endpoints were written in Python using the discord.py library. Finally, we used Docker to handle all of our dependencies and to host all of our servers to make the bot easily usable for others using our bot as a template for their own bot.
Challenges we ran into
DBZ uses Google Sheets to track who is on the main roster for practice (who has a guaranteed spot) and who is on the waitlist. Since Google Sheets was the source of truth, we needed to sync the database with the Google Sheets workbook and parse the sheet to find the data to persist in the database, which proved very difficult.
The Cronjobs to automate practice signups were also very difficult to work with. This is because the times listed in the Crontab are in UTC, and we did not realize this for the longest time because the times we were parsing from the Google Sheets workbook were in EST, so when it came time to test, our methods would not run.
Accomplishments that we're proud of
We are proud of the fact we were able to produce a working bot after having to learn how to use a whole new framework. We are also proud of ourselves for overcoming the challenges working with Google Sheets and Cronjobs presented. Finally, we are proud that we were able to work together efficiently and enjoy ourselves while doing it.
What we learned
We learned how to create a discord bot and how to link it to a backend. We also learned more about how to use Docker in a collaborative setting.
What's next for DBZ Bot
First of all, we have to clean up our code so that it is more maintainable in the future.
Then, we wanted to implement a fit-test progress visualizer. Over the course of the season, members need to complete 3 fit tests, perform various exercises, and track the weight and repetitions. We want to persist the results of all 3 tests and show users their previous scores vs. their current scores to show how they have improved.
Log in or sign up for Devpost to join the conversation.