Updated clear to show the real quantity of deleted messages

This commit is contained in:
Ninjdai 2023-09-03 17:15:20 +02:00 committed by GitHub
parent b4797d7487
commit 2ec4361fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}