A modular and simple Discord bot written completely from scratch, primarily to manage CTF challenge discussion threads. Harmony is written in Python (pycord) and uses MongoDB (pymongo) for the database. It is inspired by "Jarvis", our previous bot, which was forked from OvisBot. Harmony is designed with the latest Discord features in mind, such as slash commands and threads. Harmony displays rich informational embeds and manages channels & threads to ensure smooth team communication during CTFs.
Made with 🖤 for and by teambi0s 🇮🇳
- Self updating embeds that display useful information such as
- CTF platform credentials
- Start and end timestamps for the CTF event
- Challenges, their names, category, solve status, attempters and discussion thread
- Channels management on a per CTF basis
- Threads management on a per challenge basis
- An insane amount of challenge threads per CTF (1000 to be exact due to Discord's internal limitation)
- Multiple abstraction layers to make database management super easy
TODO
- Install python v3.11, through your package manager or pyenv
- If you'll be working with the database, install mongodb shell
git clone [email protected]:teambi0s/Harmony.git && cd Harmony
python3 -m pip install virtualenv
virtualenv -p <path to python3.11> .venv
source .venv/bin/activate.fish
(The activate script depends on your shell, choose wisely)pip install -r requirements.txt
- Congrats! you can start contributing now
- For testing,
- Populate
.env
based on.env.sample
- Run
./run.sh
to start the bot - Run
docker-compose up mongodb
to start the database - If you're having issues with docker, host a local mongodb server instead
- Populate
- For production,
- Edit
.env
appropriately - Edit
docker-compose.yml
so that mongodb is not exposed to host - Run
docker-compose up
- Edit
- Only modify
bot/cogs/*.py
, unless necessary - Prefix commit messages with
[Add]
,[Update]
,[Fix]
appropriately - Try to follow PEP8
- add 2 newlines between function/method/class definitions