Skip to content

Commit

Permalink
hotfix: remove unreachable path in autocomplete processing
Browse files Browse the repository at this point in the history
  • Loading branch information
samhwang committed Jul 27, 2024
1 parent 4b6d7de commit c278816
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils/interaction-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export const processInteraction = async (interaction: Interaction): Promise<void
logger.error(`[process-interaction]: ERROR HANDLING COMMAND: ${commandName}, ERROR: ${op.unwrapErr()}`);
return;
}

logger.info(`[process-interaction]: COMMAND HANDLED SUCCESSFULLY: ${commandName}`);
return;
}

const isContextMenuCommand = interaction.isContextMenuCommand();
Expand All @@ -37,6 +40,8 @@ export const processInteraction = async (interaction: Interaction): Promise<void
logger.error(`[process-interaction]: ERROR HANDLING CONTEXT MENU COMMAND: ${commandName}, ERROR: ${op.unwrapErr()}`);
return;
}

logger.info(`[process-interaction]: CONTEXT MENU COMMAND HANDLED SUCCESSFULLY: ${commandName}`);
}

const isAutocomplete = interaction.type === InteractionType.ApplicationCommandAutocomplete;
Expand All @@ -54,7 +59,9 @@ export const processInteraction = async (interaction: Interaction): Promise<void
logger.error(`[process-interaction]: ERROR HANDLING AUTOCOMPLETE: ${commandName}, ERROR: ${op.unwrapErr()}`);
return;
}
return await command?.autocomplete?.(interaction);

logger.info(`[process-interaction]: AUTOCOMPLETE HANDLED SUCCESSFULLY: ${commandName}`);
return;
}

logger.info(`[process-interaction]: INTERACTION TYPE NOT RECOGNIZED. TYPE: ${interaction.type}`);
Expand Down

0 comments on commit c278816

Please sign in to comment.