The presence line was hard-coded, so advertising a different message meant editing the source and restarting the bot. Statuses now live in the database and are managed from Discord with /status — add, list, remove, pause and the rotation interval, which applies without a restart. An empty list falls back to a neutral "see the commands with /help" line, and the first status added shows up right away instead of waiting a full turn.
83 lines
2.8 KiB
Bash
83 lines
2.8 KiB
Bash
# =============================================================================
|
|
# FWS-Bot — environment configuration example
|
|
# Copy this file to `.env` and fill in the values. Never commit `.env`.
|
|
# =============================================================================
|
|
|
|
# --- Runtime -----------------------------------------------------------------
|
|
# development | production | test
|
|
NODE_ENV=development
|
|
# debug | info | warn | error
|
|
LOG_LEVEL=info
|
|
LOG_DIR=./logs
|
|
# Number of days functional/technical logs are kept (M11-T08)
|
|
LOG_RETENTION_DAYS=30
|
|
|
|
# --- Discord application (M2-T01) -------------------------------------------
|
|
# Developer Portal > Bot > Token
|
|
DISCORD_TOKEN=
|
|
# Developer Portal > General Information > Application ID
|
|
DISCORD_CLIENT_ID=
|
|
# FWS server ID (slash commands are registered on this guild)
|
|
DISCORD_GUILD_ID=
|
|
|
|
# --- FWS roles (M3-T01) — Discord role IDs ----------------------------------
|
|
ROLE_OWNER_ID=
|
|
ROLE_DEV_ID=
|
|
ROLE_STAFF_ID=
|
|
# Role given to new members on join (M7-T03)
|
|
ROLE_MEMBER_ID=
|
|
|
|
# --- Discord channels (M0-T04 / M9-T01) — channel IDs -----------------------
|
|
CHANNEL_WELCOME_ID=
|
|
CHANNEL_RULES_ID=
|
|
CHANNEL_ANNOUNCEMENTS_ID=
|
|
CHANNEL_LOGS_ID=
|
|
CHANNEL_MOD_LOGS_ID=
|
|
CHANNEL_TICKETS_LOGS_ID=
|
|
CHANNEL_NOTIF_ISSUES_ID=
|
|
CHANNEL_NOTIF_PULL_REQUESTS_ID=
|
|
CHANNEL_NOTIF_COMMITS_ID=
|
|
CHANNEL_NOTIF_RELEASES_ID=
|
|
CHANNEL_NOTIF_ERRORS_ID=
|
|
# Category under which private ticket channels are created (M6)
|
|
CATEGORY_TICKETS_ID=
|
|
|
|
# --- Salons vocaux temporaires (M14) ----------------------------------------
|
|
# Salon vocal « rejoindre pour créer » : y entrer crée un salon temporaire
|
|
CHANNEL_VOICE_TRIGGER_ID=
|
|
# Catégorie d'accueil des salons vocaux créés (facultatif)
|
|
CATEGORY_VOICE_ID=
|
|
# Délai avant qu'un salon généré devenu vide soit supprimé, en ms (0 = immédiat)
|
|
VOICE_EMPTY_GRACE_MS=5000
|
|
|
|
# --- Statuts du bot (M15) -----------------------------------------------------
|
|
# Rythme par défaut de la rotation, en secondes (modifiable à chaud par /status interval)
|
|
BOT_STATUS_INTERVAL_SECONDS=60
|
|
|
|
# --- Gitea (M5-T01) ----------------------------------------------------------
|
|
GITEA_URL=https://gitea.nocode-var.tech
|
|
# Token with least privilege (read:repository, write:issue). Never log it.
|
|
GITEA_TOKEN=
|
|
GITEA_OWNER=FWS
|
|
GITEA_REPO=FWS-Arch
|
|
GITEA_TIMEOUT_MS=10000
|
|
GITEA_MAX_RETRIES=2
|
|
|
|
# --- Gitea webhooks (M9-T02) -------------------------------------------------
|
|
WEBHOOK_ENABLED=false
|
|
WEBHOOK_HOST=0.0.0.0
|
|
WEBHOOK_PORT=3000
|
|
WEBHOOK_PATH=/webhooks/gitea
|
|
# Shared secret configured in Gitea > Settings > Webhooks
|
|
GITEA_WEBHOOK_SECRET=
|
|
|
|
# --- SQLite (M1-T05) ---------------------------------------------------------
|
|
DATABASE_PATH=./data/fws-bot.sqlite
|
|
BACKUP_DIR=./data/backups
|
|
|
|
# --- FWS links (M0-T06 / M4-T04) ---------------------------------------------
|
|
FWS_WEBSITE_URL=
|
|
FWS_DOCS_URL=
|
|
FWS_DISCORD_INVITE_URL=
|
|
FWS_ARCH_REPO_URL=
|