v0.4.0
Pre-release
Pre-release
Install
npm i @tmi.js/chat@0.4Changes
- d560c3d
feat: emit the join event from the roomstate handler
Emitted when the client joins a channel after having received room-state information (which is used to populate the channel data). It does not emit when another user joins the channel because the client does not request the membership capability.
client.on('join', e => console.log(`Joined ${e.channel.login}`));- c6dd4be
fix: remove channels from maps on PART
Channels are now removed from theclient.channels,client.channelsByIdandclient.channelsByLoginMap objects when the client leaves a channel (before emitting thepartevent). - a429e9a ❗
feat!: assign lastUserstate of channel in handleUSERSTATE
AChannelinstance no longer has a circular reference viachannel.lastUserstate?.channel. - a6a4e8b
feat: add goal to giftPaidUpgrade event
ThesubeventgiftPaidUpgradetype now supports the sub-relatedgoaltypes.
client.on('sub', e => {
switch(e.type) {
case 'giftPaidUpgrade': {
if(e.goal) {
console.log('Goal updated', e.goal);
}
break;
}
}
});Full Changelog: v0.3.1...v0.4.0