I only understood a bit how it works but not properly because what I would like to do in my code is to timeout a user after they posted a keyword (like an inappropriate word in their message) and I don’t know which one to use. Thanks !
so for example I could use conditions or switch like if there is such word such word on chat etc…
client.timeout(mychannel, “username”, a duration, “reason”); ?
Sorry to bother you again, for example I tried
client.on(‘chat’, (channel, user, message, userstate, self) => {
if (message == ‘tm’) (just to test ofc) {
client.timeout(mychannel, userstate[“target-user-id”], userstate[“room-id”], a duration, “reason”);
}
}); didn’t work
or client.on(‘chat’, (channel, user, message, self) => {
if (message == ‘tm’) {
client.timeout(mychannel, “username”, a duration, “reason”);
}
}); and also didn’t work
What should I type with timeout shit with conditions ?