From a6f868a4e429f01f80af8451c5bce5e66401d680 Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Sun, 13 Feb 2022 12:40:54 +0000 Subject: [PATCH] Update 'www/boto.js' --- www/boto.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/boto.js b/www/boto.js index 9384f5a..b0d3e38 100644 --- a/www/boto.js +++ b/www/boto.js @@ -22,21 +22,21 @@ let users = {}; client.on('message', (channel, tags, message, self) => { if(self) return; const { username } = tags; - if (username === 'sarimoko' || username === 'sariboto') { - if (message === '!start-count') { + if (username === 'sarimoko') { + if (message === '!startcount') { listeningForCount = true; - } else if (message === '!end-count'){ + } else if (message === '!endcount'){ listeningForCount= false; // say count out loud const sayCount = new SpeechSynthesisUtterance(Object.keys(users).length) window.speechSynthesis.speak(sayCount); - }else if (message === '!clear-count'){ + }else if (message === '!clearcount'){ listeningForCount= false; countElement.textContent = 'Waiting for count...'; userElement.textContent = ''; users = {}; } - } else if (listeningForCount && message === '+1') { + } else if (listeningForCount && message === '1') { users[tags.username] = true; // display current count page. countElement.textContent = Object.keys(users).length;