Skip to content

v0.4.0

Pre-release
Pre-release

Choose a tag to compare

@AlcaDesign AlcaDesign released this 24 Nov 21:42
· 70 commits to main since this release

NPM Version

Install

npm i @tmi.js/chat@0.4

Changes

  • 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 the client.channels, client.channelsById and client.channelsByLogin Map objects when the client leaves a channel (before emitting the part event).
  • a429e9a ❗ feat!: assign lastUserstate of channel in handleUSERSTATE
    A Channel instance no longer has a circular reference via channel.lastUserstate?.channel.
  • a6a4e8b feat: add goal to giftPaidUpgrade event
    The sub event giftPaidUpgrade type now supports the sub-related goal types.
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