Skip to content

DipitPatowari/TLE_Python

 
 

Repository files navigation

Competitive Programming Helper Discord bot

Maintainer made-with-python PyPi version

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.

Features

  1. Competitive Programming Judges supported: Codeforces and AtCoder
  2. 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.
  3. Problem Recommendation: Recommend random problem which the user hasn't solved, satisfying the conditions given by the user in the command
  4. Points and Leaderboard: Provides points for problems recommended by the bot which the user solves and maintains leaderboards for the same
  5. Duels: One user can challenge another user using this feature for a competitive programming duel
  6. Next Contests: Provides a list of next ten contests in the future
  7. 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
  8. Rating Change: Provides the rating changes and results of a specific contest queried
  9. 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.

Usage

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:

  1. requests
  2. asyncio
  3. bs4
  4. discord
  5. datetime
  6. firebase_admin
  7. quickchart.io
  8. nest_asyncio
  9. table2ascii

Finally, the bot can be started by running the main.py file.

Making the env file

The process.env file used in the bot:

process.env

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

Working

image
image
image
image
image
image
image
image
image

Credits

This project was made by:

  1. Sparsh Mittal
  2. Adittya Gupta
  3. Yash Raj Singh
  4. Rohan Mitra
  5. Gautam Sharma
  6. Satyam Chaurasia
  7. Dipit Patowari
  8. Ayush Verma
  9. Arnav Sharan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Other 0.6%