Inspiration

One of our friends is a football addict, and loves playing football all the time. However, he continually failed to manage his time effectively, which led to him being unable to practice football. It also led to compromises in his sleep schedule. That was when we decided that we would make an assistant that could help us effectively manage our time for our upcoming Hackathon (this one).

What it does

The functions of our bot can mainly be divided into 4 subcategories - tasks management, studying timer, music control, and homework help. In tasks management, the user can add tasks (specifying the priority of the task), delete existing tasks, view added tasks, and clear the task list. For the studying timer, the bot starts a pomodoro 25/5 timer, which is a scientifically proven study technique, which studies show that productivity increases when used. This timer can be paused and resumed by the user, as well as stopped. For music control, the user can start playing a song, pause and resume the song, add other songs to queue, and skip songs. The user can also view previously played tracks. The bot then plays the music in a voice channel. For homework help, the user can ask our ChatGPT integrated bot any questions, after which the bot answers their queries.

How we built it

We used discord.py for the bot, and discord.js for the music control (due to the library we used not working with python). We used HTML, CSS, and JS to design our website. For our music control, we used a library known as ytml, which searches YouTube for the video of the music specified by the user. The advantage of this is that this is not only limited to music, but can play the audio of any video on YouTube. For the ChatGPT feature, since we couldn't use the original ChatGPT API (paid), we had to use a 3rd party API (NagaAI) which scraped OpenAI's API and was free to use.

Challenges we ran into

We can into multiple problems, including -

  • We encountered many problems with the music feature, due to a library not working properly with python, so we had to use discord.js
  • We also encountered problems with our RAM usage from repl.it , and so we had to optimise our code to run it more efficiently
  • We also encountered some problems with authentication (as one of our team members had problems with their 2FA), and accessing the bot token
  • There were some problems when designing our website, especially the commands page
  • There was also a problem where the timer wouldn’t ‘tick-down’ every second due to the lag between the code and discord, so we had to customise the timeout to workaround the lag delay between the bot and the code
  • There was a problem with finding a website to host our website and our bot
  • There were many problems in making the music feature work, even when we used discord.js

Accomplishments that we're proud of

One of our biggest achievements is that we used 3 different programs (one for the main studying feature, one for ChatGPT, and one for music control) to make our bot. This was because we wanted to decrease the load on repl.it's servers. Some other features that we're proud of is the music feature, which when it was working was very relieving.

What we learned

Ironically, one of the main things we learnt was time - management. This was due to the fact that this was our first Hackathon, and we weren't familiar with coding in one long stretch like this before. Another challenge we faced was implementing the music feature with python due to the ytml library not working. For this reason, we used discord.js to make the music feature work.

What's next for Pomodoro Buddy - Team 49

Even through this bot was deployed on Discord, this was due to the fact that Discord's API is pretty easy to use. However, in the future, this bot could be expanded to work with other platforms. Another feature we could implement is that when the timer is in the study mode, parental controls could be implemented to prevent the user from getting distracted while studying. However, when the timer is in the relax mode, the parental controls could be disabled to allow the user to enjoy other applications.

Built With

Share this project:

Updates