(client, categoryKey = null)
| 95 | } |
| 96 | |
| 97 | export function getCategoryRegistry(client, categoryKey = null) { |
| 98 | const registry = buildCommandRegistry(client); |
| 99 | |
| 100 | if (!categoryKey) { |
| 101 | return registry; |
| 102 | } |
| 103 | |
| 104 | return registry.get(normalizeCategoryKey(categoryKey)) || null; |
| 105 | } |
| 106 | |
| 107 | export function isProtectedCommand(commandName) { |
| 108 | return PROTECTED_COMMANDS.has(String(commandName || '').toLowerCase()); |
no test coverage detected