Update 'node/autoban.js'
This commit is contained in:
parent
1f64dc853a
commit
989a146fb2
|
@ -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);
|
Loading…
Reference in New Issue