This project is a Discord bot which helps a user in doing competitive programming efficiently. This project aims to replace all the existent bots which are malfunctioning due to changes in their hosting clients, and also add AtCoder as one of the judges supported, which none of the other existent bots supported.
We started off by figuring out the API requirements, thus ended up using APIs provided by Codeforces, Kenkoooo and Clist. Next, we worked on the database to be used for the project, and finally used Google's Firebase. Finally, we created various functions that would enhance a user's experience on competitive programming platforms using Python and used Beautiful Soup for web scrapping. Lastly, all this was integrated using discord.py.
- Competitive Programming Judges supported: Codeforces and AtCoder
- Handle Identification: Identifies handles of a user on the said judges, one user can have atmost one ID registered with the bot for a particular judge.
- Problem Recommendation: Recommend random problem which the user hasn't solved, satisfying the conditions given by the user in the command
- Points and Leaderboard: Provides points for problems recommended by the bot which the user solves and maintains leaderboards for the same
- Duels: One user can challenge another user using this feature for a competitive programming duel
- Next Contests: Provides a list of next ten contests in the future
- Stalk: One user can stalk any other user on the judge using this feature, which provides the problems solved by that user and their rating
- Rating Change: Provides the rating changes and results of a specific contest queried
- Graphs: Provides graphs pertaining to various features such as performance, problems solved over time and ratings of problems solved over time
The commands for all these features and their usage can be retrieved by executing the command ;help
in the server.
This bot is easy to set up and use. The bot can be installed locally by running the below command.
git clone https://github.com/Sparsh752/TLE_Python.git
Install the required dependencies:
Finally, the bot can be started by running the main.py
file.
The process.env file used in the bot:
TOKEN: Each bot, upon its creation, is given a token
by Discord which is used by discord.py
in running the bot.
GUILD: It is the id
of the channel
one wants the bot to run on.
CLIST_TOKEN: It is the token that is required for making a clist api
call, it can be availed by making an account on clist.by
This project was made by: