What are specifics of IRC chat and whispering (Noob) [SOLVED - I think]

Hey all,

This is my very first post here… so please be gently, lol.

I’m making an animated and interactive Twitchbot from scratch using Unity. I’m using sockets (I think - it’s TCPClient and StreamReader) as my client connection.

I can send and recieve standard message fine using the following format:

:[username]![username]@[username].tmi.twitch.tv PRIVMSG #[Channelname]:[message]

And this works fine! However, I’m having real trouble sending whispers. I’m connecting my second TCPClient instantiationg to “irc.chat.twitch.tv” using port 6667… but I’m unsure of what the format of a whisper message should be…

I’ve seen (in some posts on this forum) that I should use the following:

PRIVMSG #jtv :/w [TargetUser][whitespace][message]

But this isn’t working…

Is there a page that lists the specific criteria for sending and recieving whispers? I’ve only been using Unity since January (long term sick… so I got the time) but am finding it hard to find the information needed.

Also will the whisper servers send all standard messages as well? I ask because my whisper connection is getting said standard message as well… :s

Many thanks for reading this, I appreciate any advice you may have.

Humblest of warm regards,

Mike

Although undocumented in the official API, the IRC message format for incoming whispers should look something like this:

:[sender]![sender]@[sender].tmi.twitch.tv WHISPER [recipient]:[message]

where [recipient] is the username you use to connect to chat.

But if you can’t send whispers with /w, try .w instead. Hope this helps!

Hi Mike,

Whispers are managed on group chat servers and not the regular chat servers. I don’t think the move to AWS changed anything about this. So to utilize the whisper functionality, you need your second connection to connect to a group chat server.

Dev

Hi guys, many thanks for the replies.

@Dev - Yes, that’s right. I’ve been told that this URL (http://tmi.twitch.tv/servers?cluster=group) shows us the group servers, which I’m using with irc.chat.twitch.tv - however there’s also the websockets server, should I try using that one?

@TrainerTimmy - Many thanks. I’ll give a try with that format and let you know in a couple of minutes…

Again, many thanks for the replies. XD

Okay, I’ve just tried the format that you mentioned @TrainerTimmy, unfortunately that didn’t work. Of course I might be doing something else wrong…

BTW, in the format that you listed, where would I place the “/w” or “.w”?

Many thanks again,

Mike

The format @TrainerTimmy listed is for incoming whisper. You want the one for outgoing whispers.

As you mentioned yourself, that is the correct format and the one @TrainerTimmy was refering to

2 Likes

Okay, so I’ve watching a bit more of HardlySober’s youtube video about TwitchBot whispers. And what you said @TrainerTimmy (and you clarified @Freddy) is becoming clear.

First of all it seems that I DON’T need to be connected to any particular server in general to receive whispers… I AM now connecting just ONE TCPClient to irc.chat.twitch.tv to be safe, but it worked on the standard connection.

Using the ourgoing format of the following allows me to send whispers:

:[username]![username]@[username].tmi.twitch.tv PRIVMSG #[Channelname]: /w [targetuser][whitespace][message]

This works! (Woo!)

And, just as TrainerTimmy said, this is the format of the incoming whisper (provided I’ve sent the command of “CAP REQ :twitch.tv/commands”):

:[sender]![sender]@[sender].tmi.twitch.tv WHISPER [recipient]:[message]

Now it’s all making sense! Also, this means that I don’t need ANOTHER thread to run the whisper listener - just main animator thread and primary listener thread are needed now!

Many thanks to all for your input - couldn’t have worked it out without you!

Perhaps I’ll write a little ‘fellow noob guide’ to help others…

1 Like

Group chats (and whispers) are on AWS too. No need for a second connection. See [PSA] Group Chat is migrating to AWS servers

1 Like

You’re very welcome! Glad my suggestion helped you out! Have fun chatting with IRC and good luck with your awesome bot project! :smile:

Hello Dev

Im having the issue with recieving, and im under the impression that whispers were moved away from group chat servers, and it seems to me ive verified this with sending whispers while only having one connection. Perhaps you can help?? Receive chat whispers via mIRC

Hi Almightsoul,

I haven’t used mIRC at all. In fact, this project is the first time I’ve ever used IRC… EVER.

I had a quick look over your thread… can I ask, when you run the “CAP REQ :twitch.tv/commands” line do you get back an “ACK” message/acknowledgement?

IIRC you receive CAP * ACK (“capabilities acknowledged”) from the server for each CAP REQ command it can accept

yup, thats the reply you should get almightsoul. Thanks TrainerTimmy.

1 Like

No problem! :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.