Actual behaviour: When we try to time out a non-existent user, he returns No response from Twitch., after that if we try to time out again in an existing user he receives the timeout but returns the errorNo response from Twitch.
Expected behaviour: We try to timeout a user, if the user does not exist, it will return No response from Twitch., then if we try to timeout a user that exists, the timeout will be applied.
Error log:
timeout for usertest!
timeout could not be applied! Error: No response from Twitch.
timeout could not be applied! Error: No response from Twitch.
Server configuration
Operating system: Windows 7
Node version (if applicable): v12.14.1
NPM version (if applicable): 6.13.4
tmi.js version: 1.5.0
Code example:
const tmi = require('tmi.js');
const client = new tmi.Client({
options: { debug: false },
connection: { reconnect: true, secure: true },
identity: { username: "xxx", password: "xxx" },
channels: [ 'lockdzn']
});
client.connect();
client.on('message', (channel, tags, message, self) => {
if(self) return;
//if(channel == "#lockdzn"){
let messageArray = message.split(" ");
let user = messageArray[0].replace('@', '').toLowerCase();
client.timeout(channel, user, 600).then((data) => {
console.log(`timeout for ${user}!`);
}).catch((err) => {
console.log(`timeout could not be applied! Error: ${err}`);
});
//}
});
Actual behaviour: When we try to time out a non-existent user, he returns
No response from Twitch.
, after that if we try to time out again in an existing user he receives the timeout but returns the errorNo response from Twitch.
Expected behaviour: We try to timeout a user, if the user does not exist, it will return
No response from Twitch.
, then if we try to timeout a user that exists, the timeout will be applied.Error log:
Server configuration
Code example: