-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.example
More file actions
79 lines (57 loc) · 2.3 KB
/
.env.example
File metadata and controls
79 lines (57 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# .env
# Discord bot token
DISCORD_TOKEN=123
# Optional: comma-separated guild IDs to ignore
# Example: DISCORD_GUILD_BLACKLIST=123,456
DISCORD_GUILD_BLACKLIST=
# Optional: your Discord user ID (used to allow dev-only actions)
DEVELOPER_ID=
# Storage path
# Default: ./data/datastore.json
STORAGE_PATH=./data/datastore.json
# Register Discord slash commands
INIT_SLASH_COMMANDS=true
# --- Session recovery / stability knobs ---
# Delay (ms) after joining a voice channel before sending OPUS.
# Helps avoid discordgo OP4 race on some networks.
# Default: 500
VOICE_READY_DELAY_MS=500
# If no gateway messages are received for this long, we treat the session as unhealthy.
# Default: 2m
WS_SILENCE_TIMEOUT=2m
# What to do when watchdog/API probe marks the session unhealthy:
# - restart-session: restart the Discord gateway session (canonical; players/queues stay in-memory)
# - restart-voice: keep gateway session, but drop voice connections (invalidate sinks) so playback can re-join VC
# - ignore: do nothing (only log warnings)
DISCORD_UNHEALTHY_MODE=ignore
# In restart mode: ignore the first N unhealthy signals within the window (still invalidates sinks).
# Default: 0
DISCORD_UNHEALTHY_GRACE=0
# Counting window for DISCORD_UNHEALTHY_GRACE.
# Default: 1m
DISCORD_UNHEALTHY_WINDOW=1m
# --- Player transport recovery ---
# What to do when Discord voice transport fails (e.g. dead Opus channel):
# - hard (default): invalidate voice sink (forces VC re-join) + reopen stream at current seek
# - soft: first attempt to reopen stream without voice reconnect; falls back to hard if it keeps failing
PLAYER_TRANSPORT_RECOVERY_MODE=hard
# Applies to PLAYER_TRANSPORT_RECOVERY_MODE=soft:
# number of soft retries before hard fallback.
PLAYER_TRANSPORT_SOFT_ATTEMPTS=1
# --- Command execution guardrails ---
# Hard timeout for a single command execution.
# Default: 30s
COMMAND_TIMEOUT=30s
# Maximum number of concurrently running command handlers.
# Default: 16
COMMAND_PARALLELISM=16
# --- Logging (zerolog) ---
# Level: trace, debug, info, warn, error, fatal, panic
LOG_LEVEL=info
# Optional JSON log file with rotation; leave empty for stderr-only (pretty console).
# LOG_FILE=./logs/melodix.json
LOG_MAX_SIZE_MB=10
LOG_MAX_BACKUPS=3
# Max age in days for rotated files (0 = no age-based deletion)
LOG_MAX_AGE_DAYS=0
LOG_COMPRESS=false