cheran-senthil / Tle

Licence: mit
🤖 Discord Bot for Competitive Programming

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tle

Pokeball Selfbot Poketwo Automation
This specific selfbot was designed to automatically catch pokemon spawned on Discord by Poketwo bot. It also offers other utility functions to automate features like trading, releasing, id search, etc. Currently the autocatcher is powered by AI making it possible to autocatch pokemons on multiple bots like PokeTwo, PokeRealm, etc.
Stars: ✭ 131 (-22.02%)
Mutual labels:  discord-bot, discord
Lenoxbot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 163 (-2.98%)
Mutual labels:  discord-bot, discord
Calypsobot
A fully customizable bot built with discord.js
Stars: ✭ 131 (-22.02%)
Mutual labels:  discord-bot, discord
Octave
Discord bot written in Java and Kotlin using JDA.
Stars: ✭ 156 (-7.14%)
Mutual labels:  discord-bot, discord
Amongcord
Among Us Discord Bot | Discord bot for controlling voice channels during Among Us matches
Stars: ✭ 144 (-14.29%)
Mutual labels:  discord-bot, discord
Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
Stars: ✭ 16,432 (+9680.95%)
Mutual labels:  discord-bot, discord
Impostor
Automatic Discord muting for Among Us! No installs necessary, just enter the code, join the voice channel, and you're off!
Stars: ✭ 140 (-16.67%)
Mutual labels:  discord-bot, discord
Discord Panel
📊 User friendly dashboard/tool for discord bot developpers to manage servers
Stars: ✭ 116 (-30.95%)
Mutual labels:  discord-bot, discord
Carl Bot
Bot for discord using discord.py (outdated code)
Stars: ✭ 160 (-4.76%)
Mutual labels:  discord-bot, discord
Discord Bot List
Just another botlist for discord
Stars: ✭ 143 (-14.88%)
Mutual labels:  discord-bot, discord
Yuudachi
Discord moderation bot
Stars: ✭ 123 (-26.79%)
Mutual labels:  discord-bot, discord
Discord Musicbot
Very simple discord music bot with the discord.js with Song Name playing. It can able to play music with the song name
Stars: ✭ 148 (-11.9%)
Mutual labels:  discord-bot, discord
Bot
An open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
Stars: ✭ 122 (-27.38%)
Mutual labels:  discord-bot, discord
Discord Bot
A discord bot that can play music, moderate, log events and more
Stars: ✭ 127 (-24.4%)
Mutual labels:  discord-bot, discord
Modmail
A feature-rich Discord bot for easy communication between server staff and users.
Stars: ✭ 115 (-31.55%)
Mutual labels:  discord-bot, discord
Poketwo
A Discord bot.
Stars: ✭ 139 (-17.26%)
Mutual labels:  discord-bot, discord
Rowboat
A Discord bot for managing large communities
Stars: ✭ 111 (-33.93%)
Mutual labels:  discord-bot, discord
Invite Manager Bot
A discord bot that tracks invites and much more
Stars: ✭ 113 (-32.74%)
Mutual labels:  discord-bot, discord
Mirai
The core for Mirai Bot v4 [Deprecated]
Stars: ✭ 142 (-15.48%)
Mutual labels:  discord-bot, discord
Vaebot
Discord bot for everything from moderation to music.
Stars: ✭ 144 (-14.29%)
Mutual labels:  discord-bot, discord

TLE

TLE is a Discord bot centered around Competitive Programming.

Features

The features of the bot are split into a number of cogs, each handling their own set of commands.

Codeforces cogs

  • Codeforces Commands that can recommend problems or contests to users, taking their rating into account.
  • Contests Shows details of upcoming/running contests.
  • Graphs Plots various data gathered from Codeforces, e.g. rating distributions and user problem statistics.
  • Handles Gets or sets information about a specific user's Codeforces handle, or shows a list of Codeforces handles.

CSES cog

  • CSES Commands related to the CSES problemset, such as showing leaderboards.

Other cogs

  • Starboard Commands related to the starboard, which adds messages to a specific channel when enough users react with a ⭐️.
  • CacheControl Commands related to data caching.

Installation

If you want to run the bot inside a docker container follow these instructions

Clone the repository

git clone https://github.com/cheran-senthil/TLE

Dependencies

Now all dependencies need to be installed. TLE uses Poetry to manage its python dependencies. After installing Poetry navigate to the root of the repo and run

poetry install

⚠️ TLE requires Python 3.7 or later!

If you are using Ubuntu with older versions of python, then do the following:

apt-get install python3.7-venv libpython3.7-dev
python3.7 -m pip install poetry
python3.7 -m poetry install

Library dependencies

TLE also depends on cairo and pango for graphics and text rendering, which you need to install. For Ubuntu, the relevant packages can be installed with:

apt-get install libcairo2-dev libgirepository1.0-dev libpango1.0-dev pkg-config python3-dev gir1.2-pango-1.0

Additionally TLE uses pillow for graphics, which requires the following packages:

apt-get install libjpeg-dev zlib1g-dev

Final steps

You will need to setup a bot on your server before continuing, follow the directions here. Following this, you should have your bot appearing in your server and you should have the Discord bot token. Finally, go to the Bot settings in your App's Developer Portal (in the same page where you copied your Bot Token) and enable the Server Members Intent.

Create a new file environment.

cp environment.template environment

Fill in appropriate variables in new "environment" file.

Environment Variables

  • BOT_TOKEN: the Discord Bot Token for your bot.
  • LOGGING_COG_CHANNEL_ID: the Discord Channel ID of a Discord Channel where you want error messages sent to.
  • ALLOW_DUEL_SELF_REGISTER: boolean value indicating if self registration for duels is enabled.

To start TLE just run:

./run.sh

Notes

  • In order to run admin-only commands, you need to have the Admin role, which needs to be created in your Discord server and assign it to yourself/other administrators.
  • In order to prevent the bot suggesting an author's problems to the author, a python file needs to be run (since this can not be done through the Codeforces API) which will save the authors for specific contests to a file. To do this run python extra/scrape_cf_contest_writers.py which will generate a JSON file that should be placed in the data/misc/ folder.
  • In order to display CJK (East Asian) characters for usernames, we need appropriate fonts. Their size is ~36MB, so we don't keep in the repo itself and it is gitignored. They will be downloaded automatically when the bot is run if not already present.
  • One of the bot's features is to assign roles to users based on their rating on Codeforces. In order for this functionality to work properly, the following roles need to exist in your Discord server
    • Newbie
    • Pupil
    • Specialist
    • Expert
    • Candidate Master
    • Master
    • International Master
    • Grandmaster
    • International Grandmaster
    • Legendary Grandmaster

Usage

In order to run bot commands you can either ping the bot at the beginning of the command or prefix the command with a semicolon (;), e.g. ;handle pretty.

In order to find available commands, you can run ;help which will bring a list of commands/groups of commands which are available. To get more details about a specific command you can type ;help <command-name>.

Contributing

Pull requests are welcome. For major changes please open an issue first to discuss what you would like to change.

Before submitting your PR, consider running some code formatter on the lines you touched or added. This will help reduce the time spent on fixing small styling issues in code review. Good options are yapf or autopep8 which likely can be integrated into your favorite editor.

Please refrain from formatting the whole file if you just change some small part of it. If you feel the need to tidy up some particularly egregious code, then do that in a separate PR.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].