Update 'node/boto.js'

This commit is contained in:
Sarimoko 2022-02-11 08:38:05 +00:00
parent de2fd7b8d3
commit 5ab4201bfe
1 changed files with 12 additions and 0 deletions

View File

@ -41,11 +41,23 @@ client.on('message', (channel, tags, message, self) => {
const isModUp = isBroadcaster || isMod; const isModUp = isBroadcaster || isMod;
const botUserState = client.userstate[channel]; const botUserState = client.userstate[channel];
const amMod = botUserState !== undefined && botUserState.mod === true; const amMod = botUserState !== undefined && botUserState.mod === true;
const isSub = badges.subscriber || badges.founder;
// !MODS
if(isModUp && message.toLowerCase().startsWith('!so')) { if(isModUp && message.toLowerCase().startsWith('!so')) {
console.log('MOD COMMAND | so | shoutout'); console.log('MOD COMMAND | so | shoutout');
client.say(channel, `bloop`); client.say(channel, `bloop`);
} }
// !SUBS
if(isSub) {
console.log(tags.username, 'is a subscriber');
}
// General Commands
if(message.toLowerCase().startsWith('!mod')) { if(message.toLowerCase().startsWith('!mod')) {
console.log('LOG: Non-Mod command used!'); console.log('LOG: Non-Mod command used!');
} }
}); });