From 2ec4361fed59be03a3a41a9917c89ebbffa2f78a Mon Sep 17 00:00:00 2001 From: Ninjdai <65647523+Ninjdai1@users.noreply.github.com> Date: Sun, 3 Sep 2023 17:15:20 +0200 Subject: [PATCH] Updated clear to show the real quantity of deleted messages --- commands/moderation/clear.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/moderation/clear.js b/commands/moderation/clear.js index 0e95cfa..b76e611 100644 --- a/commands/moderation/clear.js +++ b/commands/moderation/clear.js @@ -22,7 +22,7 @@ module.exports = { const notPinned = fetched.filter(fetchedMsg => !fetchedMsg.pinned); await interaction.channel.bulkDelete(notPinned, true); - await interaction.editReply({ content: `J'ai bien supprimé ${number} message${number>1 ? "s" : ""} dans ce salon`, ephemeral: true}); + await interaction.editReply({ content: `J'ai bien supprimé ${notPinned.size} message${notPinned.size>1 ? "s" : ""} dans ce salon`, ephemeral: true}); } catch(err) { console.error(err); }