Skip to content

Khilseith/spellbot

Repository files navigation

Spellbot

Getting Started

Setting up pip

Creating a virtual environment

Create a virtual environment in the folder .venv

$ python -m venv .venv

Enter the environment

# Linux, Fish
$ source .venv/bin/activate.fish
# Windows, cmd.exe
> .venv\Scripts\activate.bat
# Windows, PowerShell
> .venv\Scripts\activate.ps1

Install the dependencies

Dependencies required for development

$ pip install -r dev-requirements.txt

Dependencies for running

$ pip install -r requirements.txt

Exiting the environment

$ deactivate

Running the bot

Lavalink

For 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

Bot token

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"

Running the bot

# Linux
python3.11 ./src/main.py
# Windows
> py -3.11 .\src\main.py

Before you commit

Sort your imports

Call ISort when in the project root via

$ isort .

Format your code

Call the Black formatter via

$ black .

Lint your code

Run flake8

$ flake8

if it complains fix whatever it complained about

Pre-Commit hooks

Install the pre-commit hooks via

$ pre-commit install

once 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

About

My discord bot, Spellbot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •