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

Function withSafeExecuteDecorator

src/utils/interactionHelper.js:340–353  ·  view source on GitHub ↗
(target, propertyName, descriptor)

Source from the content-addressed store, hash-verified

338}
339
340export function withSafeExecuteDecorator(target, propertyName, descriptor) {
341 const originalMethod = descriptor.value;
342
343 descriptor.value = async function(interaction, config, client) {
344 await InteractionHelper.safeExecute(
345 interaction,
346 () => originalMethod.call(this, interaction, config, client),
347 null,
348 { autoDefer: !interaction._isPrefixCommand },
349 );
350 };
351
352 return descriptor;
353}

Callers

nothing calls this directly

Calls 1

safeExecuteMethod · 0.80

Tested by

no test coverage detected