Closed davidreis97 closed 3 years ago
There are 2 additional arguments to the join and part event. Twitch sends join and part data for other users. Use theself
argument to tell when the client user has joined or parted channel
.
client.on('join', (channel, username, self) => {});
Actual behaviour:
After joining and processing messages coming from multiple channels for a while, occasionally there are dozens of events quickly fired for seemingly no reason.
In the screenshot below you can see this behaviour happening. At this point in the execution, the program wasn't joining or parting from channels, it was just processing incoming messages from channels previously joined.
Expected behaviour:
After joining a channel a 'join' event should be triggered once and when leaving a channel a 'part' event should be triggered once. No other 'join' or 'part' events should be triggered.
Server configuration