I’ve seen JOIN events take as long as several minutes to actually arrive after a user sends a message, even in a channel with literally nobody else in it. I’m sure you can imagine how this is a pretty nasty problem.
And in channels over 1k chatters it doesn’t work at all.
Basically, JOIN/PART events are basically useless… So most of us don’t tend to consume them
So… is there actually no way of getting a reasonably accurate viewer list right now? Because that’s what I’m gathering from my R&D… no API endpoint for current viewers, no NAMES on command, JOIN/PART are hilariously unreliable…
There’s the undocumented chatters endpoint http://tmi.twitch.tv/group/user/CHANNEL_NAME/chatters that you could use. This is NOT a list of viewers though, it’s a list of people connected to chat and in that channel, they may not be watching the stream (but this fact also remains with things like JOIN/PART messages too). It’s also cached like all endpoints so it’s accuracy may or may not suit your use case.