Some smol fixes
This commit is contained in:
parent
56bb0d47a2
commit
2175e626bc
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -52,6 +52,8 @@ const runList = async (listData, listID, channel) => {
|
|||
banChunks.push(banArr.splice(0, Config.MaxChunkSize));
|
||||
}
|
||||
|
||||
const chunkCount = banChunks.length;
|
||||
|
||||
for (const [i, chunk] of banChunks.entries()) {
|
||||
const promises = [];
|
||||
|
||||
|
@ -69,7 +71,7 @@ const runList = async (listData, listID, channel) => {
|
|||
break;
|
||||
}
|
||||
|
||||
say(Config.Username, `Chunk ${Number(i) + 1} of ${listID} executed successfully on channel ${channel}`);
|
||||
say(Config.Username, `Chunk ${Number(i) + 1}/${chunkCount} of ${listID} executed successfully on channel ${channel}`);
|
||||
await sleep(Config.DelayPerChunk);
|
||||
}
|
||||
} else {
|
||||
|
@ -144,7 +146,7 @@ pnslWebSocket.on('message', async (data) => {
|
|||
clients[i].on('error', (error) => {
|
||||
if (error instanceof SayError) return;
|
||||
if (error instanceof UserBanError) {
|
||||
return console.warn(`Failed to ban user ${error.username} from ${error.channelname}`);
|
||||
return console.warn(`Failed to ban user ${error.username} from ${error.channelName}`);
|
||||
}
|
||||
if (error instanceof ConnectionError) {
|
||||
if (clients[i].ready) {
|
||||
|
|
Loading…
Reference in a new issue