Create a virtual environment in the folder .venv
$ python -m venv .venv# Linux, Fish
$ source .venv/bin/activate.fish
# Windows, cmd.exe
> .venv\Scripts\activate.bat
# Windows, PowerShell
> .venv\Scripts\activate.ps1Dependencies required for development
$ pip install -r dev-requirements.txtDependencies for running
$ pip install -r requirements.txt$ deactivateFor music support you are going to need to download and run Lavalink before starting the bot For more on Lavalink go to their official repo here Make sure to add the application.yml in the root directory, it should look something like this
Before you run the bot you need to create a file called .env in the root directory. In this file you need to add your bot's token, the file should look like this
TOKEN="Whatever your token is"# Linux
python3.11 ./src/main.py
# Windows
> py -3.11 .\src\main.pyCall ISort when in the project root via
$ isort .Call the Black formatter via
$ black .Run flake8
$ flake8if it complains fix whatever it complained about
Install the pre-commit hooks via
$ pre-commit installonce you have done that the pre-commit checks should run before a commit but can be run manually via pre-commit
makes sure your code is ok to commit and if it isn't prevents the commit and tells you to fix it