MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / resolveCommandTarget

Function resolveCommandTarget

src/services/commandAccessService.js:207–219  ·  view source on GitHub ↗
(client, commandName)

Source from the content-addressed store, hash-verified

205}
206
207export 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
221export async function disableCommand(client, guildId, commandName, context = {}) {
222 const normalizedName = String(commandName || '').toLowerCase().trim();

Callers 2

disableCommandFunction · 0.85
enableCommandFunction · 0.85

Calls 1

buildCommandRegistryFunction · 0.85

Tested by

no test coverage detected