(client, input)
| 306 | } |
| 307 | |
| 308 | export function resolveCategoryChoice(client, input) { |
| 309 | if (!input) { |
| 310 | return null; |
| 311 | } |
| 312 | |
| 313 | const registry = buildCommandRegistry(client); |
| 314 | const normalizedInput = normalizeCategoryKey(input); |
| 315 | |
| 316 | for (const [key, category] of registry.entries()) { |
| 317 | if ( |
| 318 | key === normalizedInput || |
| 319 | normalizeCategoryKey(category.folder) === normalizedInput || |
| 320 | normalizeCategoryKey(category.displayName) === normalizedInput |
| 321 | ) { |
| 322 | return category; |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | return null; |
| 327 | } |
no test coverage detected