I’m relatively new to Twitch chat, both from a user and a developer point of view, and I’m trying to understand whispers and how they work with the different types of servers (ie group, event, normal). Everything I’ve read says that I won’t be able to send/receive whispers unless I’m on a group chat server. But my stream’s default chat channel isn’t on a group server, as far as I can tell. Can I move it to one?
Also, I get that event servers are for high-traffic chat rooms, but what is the purpose of group servers vs normal servers?
group chats were originally for creating separate groups to chat in. Now the same servers host the whisper functionality. Get one from http://tmi.twitch.tv/servers?cluster=group
There is nothing channel specific about them, since whispers are peer-to-peer communication.
So @livewhiletrue, you are saying if I connect to a chat server via IRC, make the correct CAP REQ, then I should hear any whispers sent to my user? I will go try that now…
So, in summary:
In order for my bot to hear whispers directed at it, it needs to connect to a group chat server.
In order for my bot to hear from a stream’s channel, it needs to connect to a normal (or event) server.
Whispers weren’t implemented by the time I developed bots so I am not sure if you actually need to be connected to a group server to recieve whispers, but I do know that you need it to be able to send them. Better safe than sorry, I guess.
also, don’t confuse group chat servers with group chat rooms, they are different things.
Issue the raw command CAP REQ :twitch.tv/commands to let the server know you want to receive data besides PRIVMSGs
Listen for the WHISPER commands. Most clients/libraries that are not specifically designed for Twitch will need to be modified to support this command so I recommend watching the raw commands coming in over your connection to see how it needs to be parsed.