Add SendChunks option and fix minor mistake

This commit is contained in:
Manuel 2021-09-26 06:48:11 +02:00
parent 9db006c293
commit d2ab1deb85
Signed by: Manuel
GPG key ID: 4085037435E1F07A
2 changed files with 4 additions and 3 deletions

View file

@ -8,6 +8,7 @@
"Blacklisted" : [], "Blacklisted" : [],
"Users": [], "Users": [],
"Channels": [], "Channels": [],
"SendChunks": true,
"SendMeme": false, "SendMeme": false,
"Prefix": "!!", "Prefix": "!!",
"MaxConnections": 30, "MaxConnections": 30,

View file

@ -89,7 +89,7 @@ const runList = async (listData, listID, channel, sourceChannel) => {
await Promise.allSettled(promises); await Promise.allSettled(promises);
say(sourceChannel, `${Config.UseParallelUniverse === true ? '[PU]' : ''} Chunk ${currentChunk}/${chunkCount} of ${listID} executed successfully on channel ${targetChannel}`); say(sourceChannel, `${Config.UseParallelUniverse === true ? '[PU]' : ''} Chunk ${currentChunk}/${chunkCount} of ${listID} executed successfully on channel ${targetChannel}`);
say(channel, `Chunk ${currentChunk}/${chunkCount} executed successfully`); if (Config.SendChunks) say(channel, `Chunk ${currentChunk}/${chunkCount} executed successfully`);
if (currentChunk === chunkCount) { if (currentChunk === chunkCount) {
break; break;
@ -217,7 +217,7 @@ if (!Config.IgnorePNSL) {
const args = content.slice(1); const args = content.slice(1);
if (command === 'ping') { if (command === 'ping') {
let channel = args[0]; const channel = args[0];
return say(channel || channelName, `${clients.filter((i) => i.ready).length} Clients from total of ${clients.length} are operational`); return say(channel || channelName, `${clients.filter((i) => i.ready).length} Clients from total of ${clients.length} are operational`);
} }
@ -227,7 +227,7 @@ if (!Config.IgnorePNSL) {
if (command === 'runlist') { if (command === 'runlist') {
const listID = args[0]; const listID = args[0];
const channel = args[1]; let channel = args[1];
if (!listID) { if (!listID) {
return say(channelName, 'No list ID provided!'); return say(channelName, 'No list ID provided!');