Skip to content

Commit

Permalink
Check if bulk messages are deleted before deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasmar authored and Kasmar committed Nov 20, 2020
1 parent a75c7f6 commit 9f0869e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adminBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ async function DeleteBulkMessages(channel, MinSeconds, MaxSeconds = 999999999) {
//console.log(GetTimestamp() + "MinFlake: " + MinFlake + " MaxFlake: " + MaxFlake);
for(const message of messages.values()) {
//console.log(GetTimestamp()+"message.id: " + message.id);
if(message.id > TwoWeeks && message.id < MinFlake) {
if(message.id > TwoWeeks && message.id < MinFlake && !message.deleted) {
filterMessages.push(message)
}
}
Expand Down

0 comments on commit 9f0869e

Please sign in to comment.