29 lines
1.4 KiB
Bash
29 lines
1.4 KiB
Bash
# subreddit-announcer configuration.
|
|
# Copy this to `config.env` and fill in real values. `config.env` is gitignored —
|
|
# never commit it. Load it before running, e.g.:
|
|
# set -a; source config.env; set +a; uv run bot.py
|
|
|
|
# --- Discord ---------------------------------------------------------------
|
|
# Bot token from https://discord.com/developers/applications
|
|
# Application -> Bot -> Reset Token. Invite the bot with the
|
|
# "applications.commands" + "bot" scopes and "Send Messages" + "Embed Links".
|
|
DISCORD_TOKEN=
|
|
|
|
# --- Reddit (read-only app) ------------------------------------------------
|
|
# Create an app at https://www.reddit.com/prefs/apps -> "create another app"
|
|
# type: "script" (or "installed app")
|
|
# the client id is the string under the app name; the secret is "secret".
|
|
REDDIT_CLIENT_ID=
|
|
REDDIT_CLIENT_SECRET=
|
|
# Reddit asks user agents be descriptive and include a contact handle.
|
|
REDDIT_USER_AGENT=discord:subreddit-announcer:1.0 (by /u/megaproxy)
|
|
|
|
# --- Behaviour (optional; sensible defaults) -------------------------------
|
|
# Seconds between poll sweeps. Lower = faster announcements, more API calls.
|
|
ANNOUNCER_POLL_INTERVAL=60
|
|
# Posts pulled from each subreddit's /new per sweep.
|
|
ANNOUNCER_FETCH_LIMIT=25
|
|
# Path to the SQLite state DB (created on first run).
|
|
# ANNOUNCER_DB=announcer.db
|
|
# Logging level: DEBUG, INFO, WARNING, ERROR.
|
|
ANNOUNCER_LOGLEVEL=INFO
|