Update 'node/boto.js'
This commit is contained in:
parent
de2fd7b8d3
commit
5ab4201bfe
12
node/boto.js
12
node/boto.js
|
@ -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!');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue