TwitchLib / TwitchLib.PubSub

PubSub component of TwitchLib.
38 stars 52 forks source link

PubSub not triggering OnFollow #124

Closed setolyx closed 9 months ago

setolyx commented 9 months ago

Essentially one day about a week-ish ago I started up my bot, went to stream, and discovered follow events are not being triggered anymore. There is no failure noted, no error message, and pubsub is 100% connected. I started on the most recent stable version, and have also tried the most recent preview available via nuget. I made no recent changes to my pubsub implementation before this testing, and things had been working completely fine previously for months.

The only suspicion I had is that something was changed on Twitch's API, but it looks like the only change twitch has made is changing their endpoint from v1 to v2 back in september. I don't know if this is relevant to the issue at hand, but figured I'd make note of it.

image

Only other thing I'd note (which I'll preface by saying I have no idea if this is relevant) is in y'alls code for TwitchPubSub.cs, I can see ListenToFollows passes the string: var topic = $"following.{channelId}";, but the endpoint listed on twitch's documentation is "channel.follow" - I should once again note I have no idea if this is relevant, just something I discovered in my searchin'!

I know technically I can fall back to the FollowerService, but I very much would prefer to continue using the pubsub feature, as it's there, works fast, and makes no sense to me that it's not working now! 😅

Please let me know if y'all need any additional info!

iProdigy commented 9 months ago

Twitch has recently killed this unofficial topic (after being notified in https://github.com/twitchdev/issues/issues/843) - you'll need a broadcaster/moderator token to read followers now (with the moderator:read:followers scope), which can be achieved via helix (FollowerService) or eventsub (channel.follow that you referenced)

setolyx commented 9 months ago

Ohhh I see! So I'll just have to get my own eventsub setup going then! Bit of a bummer but based on that post you shared I can understand why they would kill it off. Can't have people accessing info they're not exactly supposed to access! 😅

Thank you very much for confirming what I was worried might be the case, and for taking the time to reply. Guess I'll have to hop to that! I'll slap the 'ole close button on this post then.