From 528b15d14757631d4ae5fa645b8a1b3d1c27d7f1 Mon Sep 17 00:00:00 2001 From: M1000fr Date: Fri, 6 Sep 2024 17:49:02 +0200 Subject: [PATCH] fix: incr in all case deleted counter --- src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index f9a63c0..297ac33 100644 --- a/src/index.ts +++ b/src/index.ts @@ -130,9 +130,6 @@ async function main() { // Delete the message await deleteMessage(channelData.id, message.ID) .then(async () => { - // Incrémenter totalDeleted lorsqu'un message est supprimé avec succès - totalDeleted++; - messagesDeletedFile.push({ channel_id: channelData.id, message_id: message.ID, @@ -165,6 +162,8 @@ async function main() { } }); + totalDeleted++; + // Don't spam the API await wait(secondsDelay * 1000); }