fix: incr in all case deleted counter

This commit is contained in:
M1000fr 2024-09-06 17:49:02 +02:00
parent 4af081904b
commit 528b15d147

View File

@ -130,9 +130,6 @@ async function main() {
// Delete the message // Delete the message
await deleteMessage(channelData.id, message.ID) await deleteMessage(channelData.id, message.ID)
.then(async () => { .then(async () => {
// Incrémenter totalDeleted lorsqu'un message est supprimé avec succès
totalDeleted++;
messagesDeletedFile.push({ messagesDeletedFile.push({
channel_id: channelData.id, channel_id: channelData.id,
message_id: message.ID, message_id: message.ID,
@ -165,6 +162,8 @@ async function main() {
} }
}); });
totalDeleted++;
// Don't spam the API // Don't spam the API
await wait(secondsDelay * 1000); await wait(secondsDelay * 1000);
} }