web js
This commit is contained in:
parent
fda40712de
commit
eb13805d8c
|
@ -27,14 +27,16 @@ client.on('message', (wat, tags, message, self) => {
|
|||
if (self) return;
|
||||
const { username } = tags;
|
||||
if (username.toLowerCase() === channel.toLowerCase()) {
|
||||
if (message === '!start-count') {
|
||||
if (message === '!start') {
|
||||
listeningForCount = true;
|
||||
} else if (message === '!end-count') {
|
||||
}
|
||||
else if (message === '!end') {
|
||||
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 === '!clear') {
|
||||
countElement.textContent = 'Waiting for count...';
|
||||
usersElement.textContent = '';
|
||||
users = {};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<marquee><p>Type 1 in the chat!</p></marquee>
|
||||
<em>(broadcaster only)</em>
|
||||
<br />
|
||||
<code>!start-count | !end-count | !clear-count</code>
|
||||
<code>!start | !end | !clear</code>
|
||||
<br />
|
||||
<br />
|
||||
</center>
|
||||
|
|
Loading…
Reference in New Issue