Get current ROOMSTATE

Hello guys,

I am reading a channel chat via socket connection.

As far as I understood the /tags capability will only give me an update as the room state changes, so if I join a channel that is currently in slow mode, I wouldn’t notice until someone turns it off.

Is there a way of getting the current room state of a channel chat ?

Greetings and thanks for your help
IonicBlaze

You get a full ROOMSTATE upon JOINing the room.

I’m sorry, I’m probably missing something.

Upon sending my credentials and the CAP REQs this is what I get (using channel #grimmmz as example):

:tmi.twitch.tv 001 ionicblaze :Welcome, GLHF!
:tmi.twitch.tv 002 ionicblaze :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 ionicblaze :This server is rather new
:tmi.twitch.tv 004 ionicblaze :-
:tmi.twitch.tv 375 ionicblaze :-
:tmi.twitch.tv 372 ionicblaze :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 ionicblaze :>
:ionicblaze!ionicblaze@ionicblaze.tmi.twitch.tv JOIN #grimmmz
:tmi.twitch.tv CAP * ACK :twitch.tv/commands
:tmi.twitch.tv CAP * ACK :twitch.tv/tags
:tmi.twitch.tv CAP * ACK :twitch.tv/membership
:ionicblaze.tmi.twitch.tv 353 ionicblaze = #grimmmz :ionicblaze
:ionicblaze.tmi.twitch.tv 366 ionicblaze #grimmmz :End of /NAMES list
:jtv MODE #grimmmz +o anele
:jtv MODE #grimmmz +o sazzlles
:jtv MODE #grimmmz +o mssbunnii
:jtv MODE #grimmmz +o crown9te
:jtv MODE #grimmmz +o xifonix
:jtv MODE #grimmmz +o whisenhunt
:jtv MODE #grimmmz +o nightbot
:jtv MODE #grimmmz +o grimmmz

Where am I supposed to get information about the roomstate ?

Your JOIN is being acknowledged before the CAP REQs are. Delay the JOIN by a little bit.

$ openssl s_client -connect irc.chat.twitch.tv:6697 -quiet
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert SHA2 Secure Server CA
verify return:1
depth=0 C = US, ST = California, L = San Francisco, O = "Twitch Interactive, Inc.", CN = *.chat.twitch.tv
verify return:1
CAP REQ :twitch.tv/commands twitch.tv/tags
:tmi.twitch.tv CAP * ACK :twitch.tv/commands twitch.tv/tags
PASS oauth:something
NICK justinfan1
:tmi.twitch.tv 001 justinfan1 :Welcome, GLHF!
:tmi.twitch.tv 002 justinfan1 :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 justinfan1 :This server is rather new
:tmi.twitch.tv 004 justinfan1 :-
:tmi.twitch.tv 375 justinfan1 :-
:tmi.twitch.tv 372 justinfan1 :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 justinfan1 :>
JOIN #twitch
:justinfan1!justinfan1@justinfan1.tmi.twitch.tv JOIN #twitch
:justinfan1.tmi.twitch.tv 353 justinfan1 = #twitch :justinfan1
:justinfan1.tmi.twitch.tv 366 justinfan1 #twitch :End of /NAMES list
@broadcaster-lang=;emote-only=0;followers-only=-1;r9k=0;room-id=12826;slow=5;subs-only=0 :tmi.twitch.tv ROOMSTATE #twitch
:tmi.twitch.tv HOSTTARGET #twitch :gamesdonequick -
@msg-id=host_on :tmi.twitch.tv NOTICE #twitch :Now hosting GamesDoneQuick.

Cool, this works very well. Thank you!

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