This is a Python based Discord bot which helps to organise tournaments and conduct 1v1 programming matches. The bot can handle scheduling and organisation of the fixtures.
We used the Codeforces API for fetching questions and to check for submissions in real time while conducting the matches itself. We used Beautiful Soup for web scraping and parsing to get the support of AtCoder judge. We also used MongoDB database to store the tournament fixtures and the standings after every round.
We tried to create a user-friendly interface, allowing participants get to validated and compete in tournaments. All of these features were integrated with the help of discord.py library.
- Competitive Programming Judges supported: Codeforces and Atcoder.
- Validation of Handles: Validate a handle by making a request to the "user.info" method of the Codeforces API and checking the response for user information for Codeforces Handle Verification. Also no. of permissible accounts for a particular judge is limited by 1.
- Show ongoing Matches: Provide user with the list of all ongoing matches in the particular tournament.
- Start Match: Starts a lockout based match between the users(if both are registered) and asks for a time in minutes in [10-180) for that round, and presents the users with a set of 5 questions which neither of them have previously attempted.
- Match Updates: Shows the status of problems solved and remaining time for the particular round.
- Problems Presented: Takes in an input value for the rating of the first problem for the user, and the problems presented are of rating x, x+100, x+200, x+300, x+400 where x is the value input by the user.
- Show Participants: Gives the list of participants in a particular tournament along with their Codeforces and Atcoder profile's max ratings.
- Show Matches: Provides user with the fixture of matches to be played in the ongoing tournament. This fixture is built by using the method of Single Elimination Tournament with byes given in case of an unsymetric number of participants in the particular round.
The commands for all these features can be retrieved by executing the !help
command.
The Lockout Bot can be installed locally by running the below command.
git clone https://github.com/addy-1406/Lockout-Bot.git
To use the bot install the required dependencies:
To start the Bot , run the main.py
file
Start Match and Round Updates Popup
Update in Problem Set on solving a problem
This project was made by: