-
The user can search for available flights quickly by typing ".flights from [location] to [location] [date]". Date is "today" by default
-
If the user sends ".flight" the bot talks to the user in a natural friendly way requesting the flight details.
-
Using the user's answers, the bot can recommend the top 3 best flights. The user can choose the desired flight by replying with a number.
-
After the user chooses the flight they desire, the bot returns a summary of the flight chosen and a QR code that redirects to checkout.
TL;DR
Discord is used widely by the gamer community, sometimes there are events (like comic-con, pax, etc.) far away from the user's home and he or she may need to book a flight. Through this discord bot, we have managed to bring the gamer community closer to American Airlines by making it quick and easy to book a flight from their preferred chat app (Discord).
Inspiration
Most gamers nowadays have a Discord account (even non-gamers do so they can talk to their gamer friends). Therefore, making a bot to order plane tickets may ease the pain of traveling for most gamers, which honestly will discourage them from staying in their mom's basement the whole summer, playing games and re-watching all seasons of Naruto. The name "Flight Attendance" was misspelled because the member who named this bot (also writing this story) is just bad at spelling and his greatest enemy is auto-correct.
What it does
When you summon it using .flight command (invite it to your favorite Discord server), it will ask a few questions before presenting the user with the top three choices that most perfectly matched his/her preferences. It will then send you a link to purchase the flight. The API is powered by American Airlines and the bot is hosted through Google Cloud Platform.
How we built it
We just use Python and the Discord.py library to connect the bot to Discord and then we call the American Airlines API to get the flights.
Challenges we ran into
Carlos had not used discord cogs and extensions before, so he spent the first couple of hours learning how to implement and organize command cogs. At first, we went for an ambitious goal, get the bot to connect to a voice channel to use it as a Google Assistant using a python Diagflow library. After the first 5 hours, we decided to drop it because the learning curve was too steep for 24 hours. It was extremely difficult to divide the jobs equally to all participants in the way that each could shine with their strength while having enough challenges to accomplish. Time constraint was also a problem because our project was quite ambitious for just 24 hours and most of us were inexperienced with the technologies that we were dealing with.
Finally, pushing changes to our GitHub repo was a big challenge. We used the git-flow workflow to create feature branches, but when we tried to merge our branches we kept getting conflict errors. In the end, we were able to commit everything to master for our first demo release.
Accomplishments that we're proud of
We actually shipped our first team bot on Discord and were able to display the flight cards well.
What we learned
How to host a discord bot in GCP VM, use git flow workflow, and team management, time management. We've gained valuable knowledge in such a short amount of time while having fun and we are very grateful for that opportunity.
What's next for Flight Attendance
If the bot gains popularity, sharding will be the next step for the discord bot so that it can handle multiple (more than 50) user requests at once without getting slowed down. We also plan on going back to our initial plan, which was to make it a full-fledged virtual assistant (powered by Google Assistant) that you can call directly through Discord and order plane tickets using your voice. This was hard to do in just 24 hours and most of us had homework due the next day so we couldn't really stay up all night to make it a reality. So, with more time and more effort putting into the bot, we believe this plan will come true and that will make our bot the true flight attendance.
Built With
- american-airlines
- api
- discord.py
- google-cloud
- python
- zoomer-technology
Log in or sign up for Devpost to join the conversation.