Analytics bot for gathering metrics for communities. Intended for end-of-year reports to share with your community.
This bot does not have any commands or interactions. It is designed to be run in the background and will not respond to any commands.
It simply saves all Discord gateway events to a SQLite database for later analysis and replicated via Litestream to a remote S3-compatible storage.
Configuration is set in environment variables. Here's an example .env file:
# Logging
LOG_LEVEL=info
# Discord Bot Configuration
DISCORD_TOKEN=your_discord_bot_token
# SQLite database path
DATABASE_URI=./data/db.sqlite
# Litestream configuration
REPLICATE_DB=true # Optional, default is false
# Restore if DB not found
RESTORE_DB=true # Optional, default is false
LITESTREAM_ACCESS_KEY_ID=s3-access-key-id
LITESTREAM_SECRET_ACCESS_KEY=s3-secret-access-key
LITESTREAM_BUCKET=bucket-name
LITESTREAM_PATH=path/within/bucket
LITESTREAM_ENDPOINT=s3-endpoint
LITESTREAM_FORCE_PATH_STYLE=true # Optional, default is false,