This project is the python version of WeastCoastBot because my friends are picky and don't like nodejs
- Crypto: Track cryptocurrency prices and charts via CoinGecko (
/crypto). - Stonk: Track stock market data and charts via Yahoo Finance (
/stonk). - Fitbot: Fitbit integration for tracking steps and active minutes with server leaderboards (
/fitbot_*). - IMDB: Movie and TV show information search (
/imdb). - Reminders: Set reminders for yourself or the channel (
/remind_me). - Wiki: Quick Wikipedia search (
/wiki). - Ping: Simple latency check (
/ping).
- Copy the example environment file:
cp .env.example .env
- Fill in the required values in
.env:BOT_TOKEN: Your Discord Bot Token.OMDB_API_SECRET: API key from OMDb.FITBIT_CLIENT_ID&FITBIT_CLIENT_SECRET: OAuth credentials from Fitbit (if using Fitbot).DATABASE_URL: Connection string for the database (default: SQLite).
The easiest way to run the bot is with Docker Compose.
# Start the bot in development mode (with hot-reload)
make dev
# Start with Postgres instead of SQLite
make dev-postgresIf you prefer running the bot directly on your machine:
-
Install dependencies:
uv sync
-
Start the bot (runs migrations):
make start
src/pyWeastCoastBot/bot: Core bot logic and Cogs.src/pyWeastCoastBot/lib: Domain-specific libraries (crypto, fitbot, etc.).src/pyWeastCoastBot/utils: General utility functions.src/pyWeastCoastBot/db: Database models and migrations.
A Makefile is provided for common tasks:
make lint: Run ruff for linting.make format: Format code with ruff.make clean: Clean up artifacts.
This project uses Alembic for migrations.
-
Create a new migration (after modifying models):
make migrate-gen MSG="description_of_changes" -
Apply migrations:
make migrate-up
-
Downgrade migration:
make migrate-down