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

**URL:** <https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442>\
**Category:** Chat and IRC\
**Created:** [September 9, 2021, 1:31am UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442 "2021-09-09T01:31:22Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 9, 2021, 1:31am UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/1 "2021-09-09T01:31:23Z")

</div>

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](http://tmi.twitch.tv) USERNOTICE #cirno\_tv :cirCursed”

```auto
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"))

```

```auto
$ 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 :>

```

```auto
...
@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>
...

```

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 9, 2021, 9:59am UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/2 "2021-09-09T09:59:33Z")

</div>

> [@waterflame](#):
>
> `self.irc.send(bytes(f"JOIN {channel}\n", "UTF-8"))`

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`)

---

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 9, 2021, 7:44pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/3 "2021-09-09T19:44:35Z")

</div>

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

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

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

```

---

<div class="post-metadata">

**Author:** ![JJ\_The\_Bunny](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/jj_the_bunny/32/7509_2.png) [@JJ\_The\_Bunny](https://discuss.dev.twitch.com/u/JJ_The_Bunny)\
**Post date:** [September 9, 2021, 10:00pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/4 "2021-09-09T22:00:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 9, 2021, 10:01pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/5 "2021-09-09T22:01:32Z")

</div>

> [@JJ\_The\_Bunny](#):
>
> Channel point redemption does not come thru IRC

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)

---

<div class="post-metadata">

**Author:** ![JJ\_The\_Bunny](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/jj_the_bunny/32/7509_2.png) [@JJ\_The\_Bunny](https://discuss.dev.twitch.com/u/JJ_The_Bunny)\
**Post date:** [September 9, 2021, 10:04pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/6 "2021-09-09T22:04:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 9, 2021, 10:08pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/7 "2021-09-09T22:08:51Z")

</div>

> [@waterflame](#):
>
> Alas I wish it was that simple of a fix. But in the config file I have the #.

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.

---

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 10, 2021, 8:07pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/8 "2021-09-10T20:07:42Z")

</div>

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](https://d2opxh93rbxzdn.cloudfront.net/original/2X/3/3b87b82dba12a88d628b98b44a0a0fa3263bb948.png)

---

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 10, 2021, 8:09pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/9 "2021-09-10T20:09:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 10, 2021, 8:09pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/10 "2021-09-10T20:09:51Z")

</div>

You’ll need pubsub or eventsub for that.

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

> [@waterflame](#):
>
> Obviously twitch has some form of endpoint for it to display in chat. Is it supported in the websocket version of chat?

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

---

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 10, 2021, 8:11pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/11 "2021-09-10T20:11:25Z")

</div>

> [@BarryCarlyon](#):
>
> Twitch uses PubSub to display these “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)

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 10, 2021, 8:11pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/12 "2021-09-10T20:11:51Z")

</div>

> [@waterflame](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![waterflame](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/waterflame/32/13522_2.png) [@waterflame](https://discuss.dev.twitch.com/u/waterflame)\
**Post date:** [September 10, 2021, 8:12pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/13 "2021-09-10T20:12:21Z")

</div>

Okay cool. Thanks for answering my questions ^^

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 10, 2021, 8:12pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/14 "2021-09-10T20:12:31Z")

</div>

Most Welcome 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [October 10, 2021, 8:12pm UTC](https://discuss.dev.twitch.com/t/irc-not-receiving-notice-about-sub-prime-channel-point-rewards-etc/33442/15 "2021-10-10T20:12:52Z")

</div>

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