From 7ad6682f6a8836932d7d2c38dd16c85dcde74559 Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Fri, 11 Feb 2022 06:31:26 +0000 Subject: [PATCH] Update 'node/boto.js' --- node/boto.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/node/boto.js b/node/boto.js index 1e2135b..b3c11d3 100644 --- a/node/boto.js +++ b/node/boto.js @@ -25,7 +25,12 @@ client.on('message', (channel, tags, message, self) => { const isMod = badges.moderator; const isModUp = isBroadcaster || isMod; }); -// R E A C T I V E + +let isMod = user.mod || user['user-type'] === 'mod'; +let isBroadcaster = channel.slice(1) === user.username; +let isModUp = isMod || isBroadcaster; + +// START of REACTIVE // ================================== client.on("anongiftpaidupgrade", (channel, username, userstate) => { // Do your stuff. @@ -54,11 +59,11 @@ client.on("hosting", (channel, target, viewers) => { }); // User joins/connects client.on("join", (channel, username, self) => { - client.say(channel, `/me +1 Chatter! Viewer or Bot...? Time will tell!`); + // client.say(channel, `/me +1 Chatter! Viewer or Bot...? Time will tell!`); }); // Bye Felicia! client.on("part", (channel, username, self) => { - client.say(channel, `/me -1 Chatter! Where's my bounty hunters? Essemble the *air-qoutes* search-party *air-qoutes*`); + // client.say(channel, `/me -1 Chatter! Where's my bounty hunters? Essemble the *air-qoutes* search-party *air-qoutes*`); }); // Incoming Raid client.on("raided", (channel, username, viewers) => { @@ -79,15 +84,16 @@ client.on("resub", function (channel, username, months, message, userstate, meth }); client.on("subscription", function (channel, username, method, message, userstate) { // Do your stuff. - client.say(channel, `/me SUB Test`); + client.say(channel, `/me BLEEP! BLOOP! +1 Subscriber, thank you very much! MOTE-SPAM!`); + client.say(channel, `!kappagen sarimoKO sarimoNERD`); }); client.on("whisper", (from, userstate, message, self) => { // Don't listen to my own messages.. if (self) return; - - // Do your stuff. - client.say(channel, `/me Bleep! Bloop! Sext message recieved!`); + //client.say(channel, `/me Bleep! Bloop! Sext message recieved!`); }); +// END of REACTIVE +// ================================== // !COMMANDS // ================================== @@ -114,9 +120,11 @@ client.on('message', (channel, tags, message, self) => { //let isMod = user.mod || user['user-type'] === 'mod'; //let isBroadcaster = channel.slice(1) === user.username; //let isModUp = isMod || isBroadcaster; - //if(isModUp) { - // Something for moderators or higher - //} + if(isModUp) { + if(command === 'mod') { + client.say(channel, `Mod test command`); + } + } // I N F O // ==================================