tmijs / tmi.js

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

client.on("notice") not working #439

Closed jwaugh3 closed 3 years ago

jwaugh3 commented 3 years ago

Looks like when using client.on("notice", (channel, msgid, message) => { console.log('notice', channel, msgid, message); });

The configuration is setup and working for other listeners such as client.on("ban") and client.on("chat")

I was hoping to get events such as user unbanned from channel but no response is given to any events at all.

AlcaDesign commented 3 years ago

If you call client.unban(channel, username); you will get an unban NOTICE IRC message and it will event the notice event. It will not fire the event for other clients unbanning a user. That information is only available via PubSub.

Here are some NOTICE IRC messages that will only fire a notice event.

https://github.com/tmijs/tmi.js/blob/69384f4ce113767e7ecc5e6476de4b4fa284c6b3/lib/client.js#L605-L628

And also if tmi.js does not yet know the NOTICE msg-id

https://github.com/tmijs/tmi.js/blob/69384f4ce113767e7ecc5e6476de4b4fa284c6b3/lib/client.js#L659-L660