Add global command channel rules and enhance command handling

- Introduced global command channel whitelist and blacklist in the GuildSettings model for improved command access control.
- Implemented command gate logic in the command routing to handle channel and role restrictions, providing user feedback for denied commands.
- Enhanced the CommandsManager component to support global rules and channel/role selection, improving the user interface for managing command permissions.
- Updated localization files to include new keys for global command rules and related messages, ensuring clarity in user interactions.
This commit is contained in:
TheOnlyMace
2026-07-22 20:26:40 +02:00
parent 0fb8195236
commit d31660f813
24 changed files with 963 additions and 185 deletions

View File

@@ -18,7 +18,9 @@
"optional": "Optional",
"back": "Zurück",
"comingSoon": "Demnächst verfügbar",
"close": "Schließen"
"close": "Schließen",
"searchSelect": "Suchen und auswählen…",
"noResults": "Keine Treffer"
},
"nav": {
"dashboard": "Dashboard",
@@ -584,12 +586,20 @@
"searchPlaceholder": "Commands durchsuchen…",
"empty": "Keine Commands entsprechen der Suche.",
"cooldownSeconds": "Cooldown (Sekunden)",
"allowedRoleIds": "Erlaubte Rollen-IDs",
"deniedRoleIds": "Verbotene Rollen-IDs",
"allowedChannelIds": "Erlaubte Kanal-IDs",
"deniedChannelIds": "Verbotene Kanal-IDs",
"allowedRoleIds": "Erlaubte Rollen",
"deniedRoleIds": "Verbotene Rollen",
"allowedChannelIds": "Erlaubte Kanäle",
"deniedChannelIds": "Verbotene Kanäle",
"idsPlaceholder": "Eine oder mehrere IDs, kommagetrennt",
"reset": "Auf Standard zurücksetzen"
"reset": "Auf Standard zurücksetzen",
"globalTitle": "Globale Command-Regeln",
"globalDescription": "Kanal-Whitelist und -Blacklist für alle Slash-Commands auf diesem Server. Leere Whitelist = alle Kanäle (außer Blacklist). Pro-Command-Regeln gelten zusätzlich.",
"globalAllowedChannels": "Whitelist-Kanäle",
"globalDeniedChannels": "Blacklist-Kanäle",
"globalAllowedHint": "Wenn gesetzt, sind Commands nur in diesen Kanälen nutzbar.",
"globalDeniedHint": "In diesen Kanälen sind Commands immer gesperrt.",
"channelSearchPlaceholder": "Kanal suchen…",
"roleSearchPlaceholder": "Rolle suchen…"
}
},
"userMenu": {

View File

@@ -18,7 +18,9 @@
"back": "Back",
"comingSoon": "Coming soon",
"close": "Close",
"optional": "Optional"
"optional": "Optional",
"searchSelect": "Search and select…",
"noResults": "No results"
},
"nav": {
"dashboard": "Dashboard",
@@ -584,12 +586,20 @@
"searchPlaceholder": "Search commands…",
"empty": "No commands match your search.",
"cooldownSeconds": "Cooldown (seconds)",
"allowedRoleIds": "Allowed role IDs",
"deniedRoleIds": "Denied role IDs",
"allowedChannelIds": "Allowed channel IDs",
"deniedChannelIds": "Denied channel IDs",
"allowedRoleIds": "Allowed roles",
"deniedRoleIds": "Denied roles",
"allowedChannelIds": "Allowed channels",
"deniedChannelIds": "Denied channels",
"idsPlaceholder": "One or more IDs, comma-separated",
"reset": "Reset to default"
"reset": "Reset to default",
"globalTitle": "Global command rules",
"globalDescription": "Channel whitelist and blacklist for all slash commands on this server. Empty whitelist = all channels (except blacklist). Per-command rules apply on top.",
"globalAllowedChannels": "Whitelist channels",
"globalDeniedChannels": "Blacklist channels",
"globalAllowedHint": "When set, commands can only be used in these channels.",
"globalDeniedHint": "Commands are always blocked in these channels.",
"channelSearchPlaceholder": "Search channels…",
"roleSearchPlaceholder": "Search roles…"
}
},
"userMenu": {