tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.56k stars 211 forks source link

[v1.0.0-rc1] 'timeout' event returns true for duration when it's 1 second #139

Closed AlcaDesign closed 8 years ago

AlcaDesign commented 8 years ago

Actual behaviour:

When the duration is 1 second, it comes out as Boolean(true) instead of an integer.

client.on('timeout', (channel, username, reason, duration => {
    console.log(channel, username, reason, duration);
    // -> #channel username  true
});
client.timeout(channel, username, 1);

Expected behaviour:

When the duration is 1 second, it should come out as Integer(1).

client.on('timeout', (channel, username, reason, duration => {
    console.log(channel, username, reason, duration);
    // -> #channel username  1
});
client.timeout(channel, username, 1);

Server configuration

Schmoopiie commented 8 years ago

Thanks @AlcaDesign :smile: