Comfyjs.Say() is executing 20 times at once eaven should do it once, and on different channel is saying nothing
here is some code
const split = message.split(" ")
switch (split[0].toLowerCase()) {
case "add":
if (queueArray.includes(split[1])) {
ComfyJS.Say(`Nick '${split[1]}' znajduje się już na stronie`, extra.channel)
} else {
queueArray.push(`${split[1]}`)
const data = `${queueArray.join("<br>")}`
io.emit('updateData', data);
ComfyJS.Say(`Dodano nick '${split[1]}'`, extra.channel)
}
break;
case "del":
let a;
queueArray.every((elem, idx) => {
if (elem === split[1]) {
queueArray.splice(idx, 1)
ComfyJS.Say(`Usunięto nick '${split[1]}' z kolejki`, extra.channel)
a = 1
return false
}
else {
a = 0
return true
}
})```
Comfyjs.Say() is executing 20 times at once eaven should do it once, and on different channel is saying nothing here is some code