IRC not receiving notice about sub/prime/channel point rewards/etc

Hello, I was playing around with an irc bot and I noticed that I wasn’t getting notices regarding new subs/prime subs/channel point rewards/etc… I’ve CAP’d for /comamnds and /tags. Below I have the commands I send when I first connect, The response from the server, and a sample of a stream I was watching. In the middle of these messages someone redeemed their channel points for reward which had a message printed in chat.

EDIT: The odd thing is when I view the same chat in hexchat I can see lines where the notices would be as “GARBAGE: tmi.twitch.tv USERNOTICE #cirno_tv :cirCursed”

self.irc.connect((server, port))

self.irc.send(bytes("CAP REQ :twitch.tv/membership\n", "UTF-8"))
self.irc.send(bytes("CAP REQ :twitch.tv/commands\n", "UTF-8"))
self.irc.send(bytes("CAP REQ :twitch.tv/tags\n", "UTF-8"))

self.irc.send(bytes(f"PASS {botpass}\n", "UTF-8"))
self.irc.send(bytes(f"NICK {botnick}\n", "UTF-8"))
time.sleep(2)

self.irc.send(bytes(f"JOIN {channel}\n", "UTF-8"))
$ python3 main.py 
Connecting to: irc.chat.twitch.tv
:tmi.twitch.tv CAP * ACK :twitch.tv/membership
:tmi.twitch.tv CAP * ACK :twitch.tv/commands
:tmi.twitch.tv CAP * ACK :twitch.tv/tags
:tmi.twitch.tv 001 waterflame321 :Welcome, GLHF!
:tmi.twitch.tv 002 waterflame321 :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 waterflame321 :This server is rather new
:tmi.twitch.tv 004 waterflame321 :-
:tmi.twitch.tv 375 waterflame321 :-
:tmi.twitch.tv 372 waterflame321 :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 waterflame321 :>

...
@badge-info=subscriber/14;badges=moderator/1,subscriber/0;client-nonce=c359ff0ebc479fcc8403f88bccbfb916;color=#FF69B4;display-name=BZ_______;emotes=788469:80-91;first-msg=0;flags=;id=8fe69f2
6-626d-4da0-9706-fe8ca56f3fff;mod=1;room-id=39508026;subscriber=1;tmi-sent-ts=1631149588349;turbo=0;user-id=163452794;user-type=mod :bz_______!bz_______@bz_______.tmi.twitch.tv PRIVMSG #swee
tcheekstvr :<msg>

@badge-info=subscriber/13;badges=subscriber/0,premium/1;color=#556DCD;display-name=DrSyrus;emotes=;first-msg=0;flags=;id=571e396b-f917-4cb6-998b-304879eaf230;mod=0;room-id=39508026;subscribe
r=1;tmi-sent-ts=1631149592758;turbo=0;user-id=131520388;user-type= :drsyrus!drsyrus@drsyrus.tmi.twitch.tv PRIVMSG #sweetcheekstvr :<msg>

@badge-info=subscriber/13;badges=subscriber/0,premium/1;color=#556DCD;display-name=DrSyrus;emotes=;first-msg=0;flags=;id=70af65a7-2b24-4d82-88c4-a30d3cea2a11;mod=0;room-id=39508026;subscribe
r=1;tmi-sent-ts=1631149603754;turbo=0;user-id=131520388;user-type= :drsyrus!drsyrus@drsyrus.tmi.twitch.tv PRIVMSG #sweetcheekstvr :<msg>

@badge-info=;badges=;client-nonce=ba3c80851521f25f7c15c6b8d163ba78;color=#FF00C7;display-name=NekoAsunya;emotes=;first-msg=0;flags=;id=f9238037-e330-4835-b950-fb864a6ecb0f;mod=0;room-id=3950
8026;subscriber=0;tmi-sent-ts=1631149605400;turbo=0;user-id=167002468;user-type= :nekoasunya!nekoasunya@nekoasunya.tmi.twitch.tv PRIVMSG #sweetcheekstvr :<msg>

@badge-info=;badges=;client-nonce=d1476486820f107e3283e43432a7dd12;color=#FF0000;display-name=thescarlettdahlia;emotes=;first-msg=0;flags=;id=72ff2679-e631-4636-8b9e-47a960750958;mod=0;room-id=39508026;subscriber=0;tmi-sent-ts=1631149611897;turbo=0;user-id=679762757;user-type= :thescarlettdahlia!thescarlettdahlia@thescarlettdahlia.tmi.twitch.tv PRIVMSG #sweetcheekstvr :<msg>
...

This seems to indicate you have no # at the start of the room. So you didn’t join a IRC room/channel.

Since your Log output didn’t respond with a JOIN. So you tried to join a room that doesn’t exist

Try

self.irc.send(bytes(f"JOIN #{channel}\n", "UTF-8"))

Additionally make sure the channel is ALL lowercase (ie the channels username NOT their display name)

Alas I wish it was that simple of a fix. But in the config file I have the #.

## IRC Config
server = "irc.chat.twitch.tv"
port = 6667

channel = "#sweetcheekstvr"
botnick = ""
botpass = ""

Channel point redemption does not come thru IRC. Subs would tho.

They do if the redeemer is invited to leave a message. Which is what I assumed OP was referring to. (Highlight message/leave message in sub only mode/custom reward asking user to leave a message aka prompt)

Ah, right. Sorry, I wasn’t precise.

I’m out of ideas/can’t see anything obviously wrong here.

Unless your parser doesn’t understand USERNOTICE but yoiu appear to be RAW logging everything.

USERNOTICE is gonna be for subs
PRIVMSG with a reward-id tag (I forget the specific name of the tag) for rewards that trigger a chat message.

Ah okay… I’m looking for just the redeem. I was hoping to be able to do this without having to gather oauth tokens for pubsub.
image

Why doesn’t the below trigger in IRC? Obviously twitch has some form of endpoint for it to display in chat. Is it supported in the websocket version of chat?

You’ll need pubsub or eventsub for that.

Redeems that don’t let a user/redeember enter text are not sent to chat.

Twitch uses “internal” PubSub to display non message redeems “in chat”

So then how do I the user who doesn’t have a auth token for streamA see pubsub events I can’t subscribe to?(BadAuth)

You will need authorisation from the streamer. And thus use the streamers token with the relevant scopes applied.

Okay cool. Thanks for answering my questions ^^

Most Welcome :slight_smile:

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