more smol changes

This commit is contained in:
Leppunen 2021-03-30 13:21:21 +03:00
parent 0e907469e1
commit 039cab7b00

View file

@ -70,6 +70,7 @@ const runList = async (listData, listID, channel) => {
const chunkCount = banChunks.length; const chunkCount = banChunks.length;
for (const [i, chunk] of banChunks.entries()) { for (const [i, chunk] of banChunks.entries()) {
const currentChunk = i + 1
const promises = []; const promises = [];
for (const entry of chunk) { for (const entry of chunk) {
@ -80,11 +81,12 @@ const runList = async (listData, listID, channel) => {
await Promise.allSettled(promises); await Promise.allSettled(promises);
if (i +1 === chunkCount) { say(Config.Username, `Chunk ${currentChunk}/${chunkCount} of ${listID} executed successfully on channel ${channel}`);
if (currentChunk === chunkCount) {
break; break;
} }
say(Config.Username, `Chunk ${Number(i) + 1}/${chunkCount} of ${listID} executed successfully on channel ${channel}`);
await sleep(Config.DelayPerChunk); await sleep(Config.DelayPerChunk);
} }
} else { } else {