💡 Inspiration

Wanting to learn a new language, we decided to look into Go and find out what we could create with it.

Studying for your exams but not willing to lug a 5kg textbook around? goQuizBot is here to help. With goQuizBot, you can carry your study notes everywhere. Since it is on telegram and tied to your username, you can study for your quiz any time, any where as long as you have your phone! Also, since this quiz is purely online, forget about writing on index cards, we are saving the earth.

🔍 What it does

Here are the commands that goQuizBot understands:

  • /help - get list of commands
  • /add_quiz quiz_name - add a new quiz
  • /add_qns quiz_name - add questions to a selected quiz
  • /remove_qns quiz_name - remove questions from a selected quiz
  • /try_quiz - try a selected quiz
  • /delete_quiz quiz_name - delete a selected quiz
  • /list_quizzes - list all of your quizzes
  • /get_my_id - Get your telegram ID number

Please visit our project README.md for a comprehensive list of use cases and features! https://github.com/RookieHacksII2022/GoRookies/blob/main/README.md

🔧 How we built it

  • We used the go-telegram-bot-api to create the Telegram bot.
  • Firebase was used as the database. The user's information and quizzes is stored in it.
  • We used CircleCi for continuous integration, ensuring our builds and tests are correct.

🏃‍♂️ Challenges we ran into

  • Figuring out how to write code in Go
  • Setting up a Telegram bot and reading the documentation
  • Figuring out how to use the more advanced commands for the telegram bot, for example setting text formatting for the messages, which were not listed in the documentation. To figure this out, we had to read through the library source code and figure it out through much trial and error.
  • Getting firebase to connect with our Go backend
    • There were a number of complications with Go syntax and the structure of firebase commands in Go that was initially quite confusing to us that made integration with backend quite a challenge.
  • Writing the logic out for the functions
  • Customizing our bot with BotFather
    • eg adding commands
  • Understanding the usage of CircleCI

🏅 Accomplishments that we're proud of

  • Despite this being our first time working with Telegram bots, we successfully created a Telegram bot with multiple functions
  • Learning to use Go from scratch to create this project
  • Understanding firebase and setting it up to work with the bot
  • Able to do continuous integration with CircleCI

🧠 What we learned

  • Learnt a new programming language: Go
  • Create a Telegram bot for the first time
  • Firebase and how to connect it with the code in Go
  • How to use environment variables for running the bot server
  • Learnt to write config.yml files for CircleCI

⏭️ What's next for GoRookies

  • We would like to make the quiz cards more visually appealing by using HTML to design the output (questions, answers) given
  • We hope that we can add more features to the existing bot to make it more user-friendly (i.e. multiple choice question format for users, edit existing questions etc)
  • We hope to include multithreading to increase the number of users the bot can handle at once

Built With

Share this project:

Updates