From dd6eabc3e7afff41acce7ba292cde03fda1442af Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Sat, 12 Feb 2022 22:40:21 +0000 Subject: [PATCH] Update 'node/boto.js' --- node/boto.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/node/boto.js b/node/boto.js index 0d52abf..105a4e4 100644 --- a/node/boto.js +++ b/node/boto.js @@ -20,6 +20,7 @@ const client = new tmi.Client({ client.connect(); +// RNG User const rp = require('request-promise'); function getChatters(channelName, _attemptCount = 0) { @@ -62,10 +63,10 @@ function getRandomChatter(channelName, opts = {}) { null : chatters[Math.floor(Math.random() * chatters.length)]; }); -} +} // RNG END // SCAN MSG | START -client.on('message', (channel, tags, message, self) => { +client.on('message', (channel, userstate, tags, message, self) => { if(self) return; const badges = tags.badges || {}; // Scan Badges const isBroadcaster = badges.broadcaster; // Define Streamer @@ -80,9 +81,9 @@ client.on('message', (channel, tags, message, self) => { const command = args.shift().toLowerCase(); // !COMMAND => command // CMD | CHAT COMMANDS | Start - if(command === 'randomuser') { + if(command === 'rnguser') { // Get a random user but skip the user requesting a random user - getRandomChatter(channel, { skipList: [ tags.username ] }) + getRandomChatter(channel, { skipList: [ userstate.username ] }) .then(user => { if(user === null) { client.send(channel, `${userstate.username}, there was no one to choose.`);