Update 'node/autoban.js'

This commit is contained in:
Sarimoko 2022-02-16 23:02:27 +00:00
parent 1f64dc853a
commit 989a146fb2
1 changed files with 20 additions and 4 deletions

View File

@ -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);