Is there anyway to check if the user is subscribed to the channel via IRC? I have looked into making a request but It would be better if I didn’t need the oauth of the channel host.
To my knowledge, the only way to do that is if you catch the subscribed text from twitchnotify. That would mean you would need to be in the chat at all times looking for that text. Why do you need this through chat rather than the API? Trying to understand the use case.
If a user sends a message and you have tags capability enabled, you can check the subscriber tag on said message. You can check the tags documentation here.
What DallasNChains said would apply to catch a subscription starting or renewing it monthly, ‘twitchnotify’ makes an announcement you can use to trigger an action.
What 3ventic has said is the more conventional message which can give you the current status of a user at any time as long as they said something. So if you have doing an action on a chat trigger !command then you can check the IRCv3 tags:
@badges=global_mod/1,turbo/1;color=#0D4200;display-name=TWITCH_UserNaME;emotes=25:0-4,12-16/1902:6-10;mod=0;room-id=1337;subscriber=0;turbo=1;user-id=1337;user-type=global_mod :twitch_username!twitch_username@twitch_username.tmi.twitch.tv PRIVMSG #channel :Kappa Keepo Kappa
“subscriber=0” not subscribed. “subscriber=1” they are subscribed.
Of course there is the least popular method of doing an API call using an oauth:token generated by the streamer of that channel.
How do you enable tags? I’m about to google, but just incase I can’t find out
You can enable tags by sending
CAP REQ :twitch.tv/tags\r\n at any point after connecting, even before
PASS, if you wish.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.