Define the environment variables used in utils/env.py
in your environment or .env
(.env
takes priority):
# For loading config file, not required
BOT_CONFIG_PATH=config_data.json
# Discord
DISCORD_TOKEN=...
GUILD_ID=...
# Twitch
TWITCH_CLIENT=...
TWITCH_SECRET=...
TWITCH_USER=...
# YouTube
YT_API_KEY=...
YT_CHANNEL_ID=...
# Logging Channel
LOGGING_CHANNEL_NAME=...
Follow instructions in BOT_INSTALLATION.md
Copy config_data-example.json
, rename it to config_data.json
and adjust the options as needed.
time.json
will be created automatically when the bot starts.
pipx install poetry
- Install dependencies:
poetry install
- Set up precommit hooks:
poetry run pre-commit install
For overriding the .env guild you can set FORCE_GUILD_ID value
export FORCE_GUILD_ID="YOUR_TARGET_GUILD_ID"
poetry run task bot
For more tasks, see pyproject.toml
.
pipx install pipreqs
pipreqs .
poetry run pre-commit uninstall