Refactor slash command synchronization logic to prevent duplicate commands in Discord. Update environment variables for command sync modes and enhance command clearing functionality. Improve command registration handling in the bot to streamline user experience.
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 9s

This commit is contained in:
TheOnlyMace
2026-07-21 22:53:51 +02:00
parent 1da2085087
commit a52d84467d
5 changed files with 130 additions and 90 deletions

View File

@@ -27,11 +27,12 @@ LAVALINK_PASSWORD="youshallnotpass"
LAVALINK_SECURE="false"
LAVALINK_PORT="13592"
SLASH_SYNC_GLOBAL=true
# Instant / commands in every connected server (set false if you have many guilds and hit rate limits)
SLASH_SYNC_ALL_GUILDS=true
# Or limit instant sync to specific guild IDs (comma-separated). Overrides ALL_GUILDS when set.
SLASH_SYNC_MODE=global
# global = one set worldwide (default, no duplicates)
# guild = instant only in connected servers (set SLASH_GUILD_IDS or rely on all guilds)
# SLASH_GUILD_IDS=
# Clears old per-server copies that caused duplicate /commands in Discord
SLASH_CLEAR_GUILD_COMMANDS=true
# ── API / Dashboard Backend ───────────────────────────────────────────────────
API_ENABLED="false"