Timeout with tmi.js

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 ?