in src/listeners/interactionCreate.ts [16:30]
export default (client: Client): void => {
client.on("interactionCreate", async (interaction: Interaction) => {
try {
if (interaction.isCommand() || interaction.isContextMenuCommand()) {
await handleSlashCommand(client, interaction);
} else if (interaction.isButton()) {
await handleButtonAction(client, interaction);
}
} catch (error) {
if (LOG_ERRORS) {
console.log(error);
}
}
});
};