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

Function execute

src/commands/Verification/modules/autoVerify.js:57–78  ·  view source on GitHub ↗
(interaction, config, client)

Source from the content-addressed store, hash-verified

55 ),
56
57 async execute(interaction, config, client) {
58 const wrappedExecute = withErrorHandling(async () => {
59 const subcommand = interaction.options.getSubcommand();
60 const guild = interaction.guild;
61
62 switch (subcommand) {
63 case "setup":
64 return await handleSetup(interaction, guild, client);
65 case "dashboard":
66 return await autoVerifyDashboard.execute(interaction, config, client);
67 default:
68 throw createError(
69 `Unknown subcommand: ${subcommand}`,
70 ErrorTypes.VALIDATION,
71 "Invalid subcommand selected.",
72 { subcommand }
73 );
74 }
75 }, { command: 'autoverify', subcommand: interaction.options.getSubcommand() });
76
77 return await wrappedExecute(interaction, config, client);
78 }
79};
80
81async function handleSetup(interaction, guild, client) {

Callers

nothing calls this directly

Calls 3

withErrorHandlingFunction · 0.90
createErrorFunction · 0.90
handleSetupFunction · 0.70

Tested by

no test coverage detected