diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 0c9eafe..b1ebb02 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -22,7 +22,20 @@ module.exports = { await authorizeCommand(interaction, command, async () => { await authorizeTokenUsage(interaction, command, async () => { try { - if (command.deferInitialReply || !interaction.options.getBool('public')) await interaction.deferReply({ ephemeral: true }); + if (command.deferInitialReply) { + try { + if (!interaction.options.getBool('public')) await interaction.deferReply({ ephemeral: true }); + } + catch (err) { + if (err instanceof TypeError) { + // The public option doesn't exist in this command + await interaction.deferReply({ ephemeral: true }); + } else { + throw err; + } + + } + } command.execute(interaction); } catch (error) { log.ERROR(error);