datacurve-ai / codeforces-discord-bot

A Discord bot middleman for interacting with Codeforces
0 stars 4 forks source link

Codeforces Bot for Discord

Project status

This project is a Discord bot designed to interact with the Codeforces API, providing users with information about contests, user standings, and more directly through Discord commands.

Features

How to Use

  1. Invite the Bot:
    • Click here to invite the bot to your server.
    • The bot is currently hosted on a free Koyeb instance, so it may not be available all the time.
  2. Commands:
    • /userinfo username:<username>: Get information about a Codeforces user.
    • /upcoming-contests: List upcoming Codeforces contests.
    • /finished-contests: List recently finished Codeforces contests.
    • /standing username:<username> contest_id:<contestId>: Get a user's standing in a specific contest.
    • /random-problem ratingSart:<ratingStart> ratingEnd:<ratingEnd> [tags:<tag1,tag2,...>]: Get a random problem from Codeforces, given rating and tags.
    • /rating-history username:<username>: Get the rating history graph of a user.

Screenshots

  1. Random Problem:

https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot/assets/73834838/550f070c-ec15-4c89-a7e4-efcd4bf00933

  1. User Information:

https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot/assets/73834838/5aa37744-2aa0-4c7a-81f2-203d5996db62

  1. Rating History:

https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot/assets/73834838/a38da1d5-7618-4cb7-a139-d3d969058606

  1. Upcoming and Finished Contests:

https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot/assets/73834838/e5a56165-4d59-409e-b666-0fe53080bff2

  1. User Contest Standings:

https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot/assets/73834838/98cdc743-214a-430b-bcef-21448ecc36d7

Setup

  1. Clone the Repository:
git clone https://github.com/AhmedMohamedAbdelaty/Codeforces-Discord-bot.git
  1. Build the Project (requires Maven):
mvn clean install
  1. Run the Docker Container:
docker build -t codeforces-bot .
docker run -d -p 8000:8000 codeforces-bot -t <your_bot_token>

Contributing

Contributions are welcome! Please feel free to submit a pull request.

TODO