diff --git a/README.md b/README.md index ff71710..ec6a9b5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This project is a Server Discord bot that handles interactions, messages, reactions, and Slash commands. It is built using Python and the Discord.py library. -## Getting Started +## Setup for Running the Bot To use this bot, you need to do the following: @@ -14,6 +14,25 @@ To use this bot, you need to do the following: 5. Install the required Python packages by running `pip install -r requirements.txt.` 6. Run the `main.py` file to start the bot. +## Setup for Development +1. Clone this repository to your local machine. +2. Modify `config.py` with your settings. +3. Add the required secrets to `.env.example` +4. Rename `.env.example` to `.env` +5. Install `poetry` using [official instructions](https://python-poetry.org/docs/#installing-with-the-official-installer) +6. Install the required python packages by running `poetry install` +7. Install `pyright` using [official instructions](https://microsoft.github.io/pyright/#/installation) +8. Run the `main.py` file to start the bot. + +### Commonly used development commands +- **Adding Dependency** `poetry add ` +- **Adding Dev Dependency** `poetry add --group dev` +- **Updating Requirements File** `poetry export --without-hashes --only main -o requirements.txt` +- **Updating Dev Requirements File** `poetry export --without-hashes -o dev-requirements.txt --only dev` +- **Sorting Imports** `isort .` +- **Formatting Code** `black .` +- **Static Type Checking** `pyright` +> Make sure to sort imports,format code and run pyright before commits so workflow passes ## Project Structure diff --git a/dev-requirements.txt b/dev-requirements.txt index ff19952..4f635a5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,8 +1,8 @@ appnope==0.1.3 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "darwin" asttokens==2.2.1 ; python_version >= "3.10" and python_version < "4.0" backcall==0.2.0 ; python_version >= "3.10" and python_version < "4.0" -black==23.3.0 ; python_version >= "3.10" and python_version < "4.0" -click==8.1.3 ; python_version >= "3.10" and python_version < "4.0" +black==23.7.0 ; python_version >= "3.10" and python_version < "4.0" +click==8.1.6 ; python_version >= "3.10" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows") decorator==5.1.1 ; python_version >= "3.10" and python_version < "4.0" executing==1.2.0 ; python_version >= "3.10" and python_version < "4.0" @@ -16,8 +16,8 @@ parso==0.8.3 ; python_version >= "3.10" and python_version < "4.0" pathspec==0.11.1 ; python_version >= "3.10" and python_version < "4.0" pexpect==4.8.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" pickleshare==0.7.5 ; python_version >= "3.10" and python_version < "4.0" -platformdirs==3.5.3 ; python_version >= "3.10" and python_version < "4.0" -prompt-toolkit==3.0.38 ; python_version >= "3.10" and python_version < "4.0" +platformdirs==3.9.1 ; python_version >= "3.10" and python_version < "4.0" +prompt-toolkit==3.0.39 ; python_version >= "3.10" and python_version < "4.0" ptyprocess==0.7.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" pure-eval==0.2.2 ; python_version >= "3.10" and python_version < "4.0" pygments==2.15.1 ; python_version >= "3.10" and python_version < "4.0" diff --git a/requirements.txt b/requirements.txt index 2709014..16ae9d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,23 @@ aiodns==3.0.0 ; python_version >= "3.10" and python_version < "4.0" -aiohttp==3.8.4 ; python_version >= "3.10" and python_version < "4.0" +aiohttp==3.8.5 ; python_version >= "3.10" and python_version < "4.0" aiosignal==1.3.1 ; python_version >= "3.10" and python_version < "4.0" async-timeout==4.0.2 ; python_version >= "3.10" and python_version < "4.0" attrs==23.1.0 ; python_version >= "3.10" and python_version < "4.0" brotli==1.0.9 ; python_version >= "3.10" and python_version < "4.0" -certifi==2023.5.7 ; python_version >= "3.10" and python_version < "4.0" +certifi==2023.7.22 ; python_version >= "3.10" and python_version < "4.0" cffi==1.15.1 ; python_version >= "3.10" and python_version < "4.0" -charset-normalizer==3.1.0 ; python_version >= "3.10" and python_version < "4.0" -cryptography==41.0.1 ; python_version >= "3.10" and python_version < "4.0" -discord-py[speed]==2.3.0 ; python_version >= "3.10" and python_version < "4.0" -frozenlist==1.3.3 ; python_version >= "3.10" and python_version < "4.0" +charset-normalizer==3.2.0 ; python_version >= "3.10" and python_version < "4.0" +cryptography==41.0.2 ; python_version >= "3.10" and python_version < "4.0" +discord-py[speed]==2.3.1 ; python_version >= "3.10" and python_version < "4.0" +frozenlist==1.4.0 ; python_version >= "3.10" and python_version < "4.0" idna==3.4 ; python_version >= "3.10" and python_version < "4.0" multidict==6.0.4 ; python_version >= "3.10" and python_version < "4.0" -orjson==3.9.1 ; python_version >= "3.10" and python_version < "4.0" +orjson==3.9.2 ; python_version >= "3.10" and python_version < "4.0" pycares==4.3.0 ; python_version >= "3.10" and python_version < "4.0" pycparser==2.21 ; python_version >= "3.10" and python_version < "4.0" python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0" python-dotenv==1.0.0 ; python_version >= "3.10" and python_version < "4.0" sib-api-v3-sdk==7.6.0 ; python_version >= "3.10" and python_version < "4.0" six==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -urllib3==2.0.3 ; python_version >= "3.10" and python_version < "4.0" +urllib3==2.0.4 ; python_version >= "3.10" and python_version < "4.0" yarl==1.9.2 ; python_version >= "3.10" and python_version < "4.0"