Inspiration
What if Uber was free? The CometCommute Discord bot was born out of the desire to provide a free rideshare option to UT Dallas students. As many students do not have a car, they are not able to get where they want, when they want. Together as a community, through bot developers, volunteer drivers, and Discord servers used by thousands of students, travel can be available for all.
What it does
CommuteBot allows riders to request a ride in a Discord server, specifying their current and desired location. Drivers are notified of rider requests, and can choose where or not to accept. Upon accepting the request, the driver and rider are automatically added to a private channel to communicate.
How we built it
Our bot was built using discord.js, a Node.js module that allows interaction with the Discord API, and a MongoDB database in MongoDB Atlas to store ride information. We use AWS ECS Fargate to run CometCommute, Docker to package the app for easy deployment, Terraform to manage the AWS environment, and Travis-Cl to automatically deploy the latest code.
Challenges we ran into
discord.js, and its "documentation"
Accomplishments that we're proud of
We originally planned to use discord.py and use template code from our previous bots to implement the use case for CometCommute. We learned at the start of HackUTD that discord.py was deprecated and no longer maintained, so we made a quick decision to pivot to discord.js and node. None of us are as proficient in JS as we are with python, so this was a huge challenge for us.
We're proud to have been able to create a bot in JavaScript that is prepared and scalable for the future, and helps serve our community.
What we learned
Alex: "This was my first project using ECS Fargate - normally I back my ECS clusters with an EC2 Autoscaling Group. I was amazed at how fast we were able to go from zero to deployment using Fargate, it was super simple to use and easy to configure. While Fargate does come at an increased cost, the time constraints around our project made Fargate a great choice."
Nate: "This is the first Discord bot I've made using discord.js, and the transition from the familiar discord.py library has been a challenging but rewarding experience. I've learned to implement slash commands in a concise way, and how to work with a MongoDB database."
Blake: "This is both my first Discord bot, and first experience with JavaScript altogether. Learning a new language on the fly has been challenging, but has taught me a lot, and made me a better developer. I've learned about promises, how to implement async functions, and the value of spending time with documentation over referring to simpler resources. "
What's next for CometCommute Discord Bot
The CometCommute Discord Bot can handle on-demand ride requests, but soon riders will be able to schedule a ride for a later date. Our database allows for this feature to be easily implemented in the near future.
Video Demos
Live Demo
Built With
- amazon-web-services
- discord.js
- docker
- javascript
- mongodb
- node.js
- terraform
- travis-ci
Log in or sign up for Devpost to join the conversation.