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 @@
"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": {