From 9ddfc48bb2fb98d5586fdef3bb777aa0612267d6 Mon Sep 17 00:00:00 2001 From: almeidx Date: Wed, 28 Jul 2021 23:57:29 +0100 Subject: [PATCH] simplify --- backend/src/plugins/Mutes/commands/MutesCmd.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/plugins/Mutes/commands/MutesCmd.ts b/backend/src/plugins/Mutes/commands/MutesCmd.ts index 74e2dc84..27b33523 100644 --- a/backend/src/plugins/Mutes/commands/MutesCmd.ts +++ b/backend/src/plugins/Mutes/commands/MutesCmd.ts @@ -225,14 +225,11 @@ export const MutesCmd = mutesCmd({ interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true }); } else { collector.resetTimer(); + await interaction.deferUpdate(); if (interaction.customId === `previousButton:${idMod}` && currentPage > 1) { - await interaction.deferUpdate(); await drawListPage(currentPage - 1); } else if (interaction.customId === `nextButton:${idMod}` && currentPage < totalPages) { - await interaction.deferUpdate(); await drawListPage(currentPage + 1); - } else { - await interaction.deferUpdate(); } } });