(client, commandName)
| 205 | } |
| 206 | |
| 207 | export function resolveCommandTarget(client, commandName) { |
| 208 | const normalizedName = String(commandName || '').toLowerCase().trim(); |
| 209 | const registry = buildCommandRegistry(client); |
| 210 | |
| 211 | for (const category of registry.values()) { |
| 212 | const match = category.commands.find((command) => command.name.toLowerCase() === normalizedName); |
| 213 | if (match) { |
| 214 | return match; |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | return null; |
| 219 | } |
| 220 | |
| 221 | export async function disableCommand(client, guildId, commandName, context = {}) { |
| 222 | const normalizedName = String(commandName || '').toLowerCase().trim(); |
no test coverage detected