From 989a146fb265c3ab87ae09ea94fa7888436e7be3 Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Wed, 16 Feb 2022 23:02:27 +0000 Subject: [PATCH] Update 'node/autoban.js' --- node/autoban.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/node/autoban.js b/node/autoban.js index ca0eff2..7f29a1c 100644 --- a/node/autoban.js +++ b/node/autoban.js @@ -33,13 +33,29 @@ client.on('message', (channel, tags, message, self) => { const isBroadcaster = badges.broadcaster; // Define Streamer const isMod = badges.moderator; // Define Mod const isModUp = isBroadcaster || isMod; // Permission Merge = Mod+Streamer - const isSub = badges.subscriber || badges.founder; // Define Subs const botUserState = client.userstate[channel]; // MOD Status Check const amMod = botUserState !== undefined && botUserState.mod === true; // Define Mod Status if(self || !message.startsWith('!')) return; // Command Parser const args = message.slice(1).split(' '); const command = args.shift().toLowerCase(); // !COMMAND => command - -// Ban function - + // Define Ban & Unban Functions + const cmd_ban = console.log(`Banning | @`.black.bgBrightRed+ botlist.black.bgYellow, `from channel #`black.bgBrightRed+ channel); && + client.say(channel, `/ban `+ botlist); + const cmd_unban = client.say(); + // Mods + if(isMod) { + if(command === 'banbots') {} + if(command === 'unbanbots') {} + } + // Mods + Streamer + if(isModUp) { + if(command === 'banbots') {} + if(command === 'unbanbots') {} + } + // Streamer + if(isBroadcaster) { + if(command === 'banbots') {} + if(command === 'unbanbots') {} + } +}); console.log(process.env.API_HOST); \ No newline at end of file