diff --git a/.github/images/birdbot.png b/.github/images/birdbot.png new file mode 100644 index 0000000..0c9f018 Binary files /dev/null and b/.github/images/birdbot.png differ diff --git a/README.md b/README.md index c828376..78fa77d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,65 @@ -# Kurzgesagtbot +

+
+ Bird Bot +
+ Bird Bot +
+

-A multi-purpose discord bot for [Kurzgesagt Discord](https://discord.gg/kurzgesagt). +

The almighty and powerful Bird Bot helps run the Kurzgesagt discord server like a well oiled machine

+ +# ➡️ Getting Started + +## ⚙️ Prerequisites + +- [Python 3.11 or higher](https://www.python.org/) +- [MongoDB](https://www.mongodb.com/) + +## 📦 Installation + +Follow these steps to get the bot up and running in your system +- Run the following commands + +``` +# clone the repository +git clone https://github.com/kurzgesagt-in-a-nutshell/kurzgesagtbot + +# install virtualenv if you haven't already (Or use another Virtual Environment manager) +pip install virtualenv + +# Setup a venv +python3.11 -m venv birdbot +source birdbot/bin/activate + +# install the dependencies +pip install -r requirements.txt +``` + +- Navigate to /app/utils/config.py and change the values of the variables according to your requirements + +- Create a file named `.env` and paste the following lines in it. Change the values of the variables according to your requirements +``` +MAIN_BOT_TOKEN='INSERT_MAIN_BOT_TOKEN' +BETA_BOT_TOKEN='INSERT_BETA_BOT_TOKEN' +ALPHA_BOT_TOKEN='INSERT_ALPHA_BOT_TOKEN' +DB_KEY='INSERT_MONGODB_DATABASE_CONNECTION_URL' +``` + +- Run the bot with, use the `-a` or `-b` option to run testing versions of the bot +``` +python3 startbot.py [-b] [-a] +``` + +If you need additional help you may join our [Discord Server](https://discord.gg/kurzgesagt) + +# 🤲 Contributing + +Please read our contributor guidelines [here](https://github.com/kurzgesagt-in-a-nutshell/.github/blob/main/CONTRIBUTING.md) before contributing + +Before submitting a pull request please ensure you conform to our [PyRight](https://github.com/microsoft/pyright) standards and be sure to use [ISort](https://pycqa.github.io/isort/#using-isort) import sorter and the [Black](https://github.com/psf/black) code formatter. +Run these commands (preferably in the given order) and make sure they do not throw any errors: +``` +pyright . +isort . +black . +``` diff --git a/app/cogs/misc.py b/app/cogs/misc.py index 3eb07b5..7bdf0b7 100644 --- a/app/cogs/misc.py +++ b/app/cogs/misc.py @@ -311,9 +311,9 @@ def add_emojis(self, text: str) -> str: return re.sub( r"(?)", - lambda emoji: f"<{emoji.group()}{serverEmojis[emoji.group()]}>" - if emoji.group() in serverEmojis - else emoji.group(), + lambda emoji: ( + f"<{emoji.group()}{serverEmojis[emoji.group()]}>" if emoji.group() in serverEmojis else emoji.group() + ), text, ) diff --git a/requirements.txt b/requirements.txt index 3dd5368..1109978 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,37 +1,34 @@ -aiohttp==3.8.3 +aiohttp==3.9.3 aiosignal==1.3.1 -async-timeout==4.0.3 attrs==23.2.0 -black==22.12.0 -certifi==2022.12.7 -cfgv==3.4.0 -charset-normalizer==2.1.1 +black==24.3.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 click==8.1.7 -commonmark==0.9.1 demoji==1.1.0 discord.py==2.3.2 -distlib==0.3.8 -dnspython==2.5.0 -filelock==3.13.1 +dnspython==2.6.1 frozenlist==1.4.1 fuzzywuzzy==0.18.0 -identify==2.5.33 idna==3.6 -isort==5.12.0 +isort==5.13.2 +Levenshtein==0.25.0 +markdown-it-py==3.0.0 +mdurl==0.1.2 multidict==6.0.5 mypy-extensions==1.0.0 nodeenv==1.8.0 -numpy==1.24.1 +numpy==1.26.4 +packaging==24.0 pathspec==0.12.1 platformdirs==4.2.0 -pre-commit==3.6.0 Pygments==2.17.2 -pymongo==4.3.3 -pyright==1.1.327 -python-dotenv==0.21.0 -PyYAML==6.0.1 -requests==2.28.1 -rich==13.0.0 -urllib3==1.26.18 -virtualenv==20.25.0 +pymongo==4.6.2 +pyright==1.1.355 +python-dotenv==1.0.1 +python-Levenshtein==0.25.0 +rapidfuzz==3.7.0 +requests==2.31.0 +rich==13.7.1 +urllib3==2.2.1 yarl==1.9.4