Files
FWS-DiscordBot/.env.example
T
BlackAngelTV 76e2269555 feat(voice): guarantee an empty generated channel disappears
A generated channel could survive with nobody in it: the row was dropped before
the channel was really gone, so a refused delete call left a room nothing could
track anymore, and an event missed while the bot was down was never retried.

The row is now kept until Discord confirms the channel is gone, and a sweep at
startup then every minute deletes whatever the event missed. The grace period
is tunable with VOICE_EMPTY_GRACE_MS, 0 deleting as soon as the room empties.
2026-09-15 16:11:30 +02:00

80 lines
2.6 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
# --- 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=