Discord bot for PZSD server
Install uv and then run the following:
# Create virtual environment and install dependencies
uv sync
# Optionally omit dev dependencies
uv sync --no-dev
Install postgresql and create a database called pzsd
:
createdb -O postgres pzsd
Run migrations:
uv run alembic upgrade head
Before running the bot, a .env
file is expected to exist that looks like the following:
BOT_TOKEN=yourbottokenhere
POINTS_LOG_CHANNEL=channelidhere
uv run python -m pzsd_bot
uv run pytest -v --disable-warnings
uv run ruff check
uv run ruff format --check
# To see potential changes
uv run ruff check --diff
uv run ruff format --diff
# To make changes
uv run ruff check --fix
uv run ruff format
If you've made a change to pzsd_bot/model.py, you can generate a new migration file:
uv run alembic revision --autogenerate -m "description of your migration"