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: SunRed
GPG Key ID: 4085037435E1F07A
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -89,7 +89,7 @@ const runList = async (listData, listID, channel, sourceChannel) => {
await Promise.allSettled(promises);
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) {
break;
@ -217,7 +217,7 @@ if (!Config.IgnorePNSL) {
const args = content.slice(1);
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`);
}
@ -227,7 +227,7 @@ if (!Config.IgnorePNSL) {
if (command === 'runlist') {
const listID = args[0];
const channel = args[1];
let channel = args[1];
if (!listID) {
return say(channelName, 'No list ID provided!');