Closed JayJay1989 closed 4 years ago
This looks great. Do you have sample payloads received from Twitch for these events? Thanks!
Sure, here you go: https://gist.github.com/JayJay1989/1730d1ede2e2c23809c6986af93e0c14
I added the payloads for the leaderboard events for giftsubs and bits also to the link above
Looks good to me. Will leave open a few more days to allow others to review before merging. Thanks!
@swiftyspiffy the events doesn't get triggered for some reason. Maybe its something i do wrong in my test setup. Edit: you can ingore this, got it working
So it is mergeable then?
Channelpoint reward redeemed should working: http://prntscr.com/qbsbml Leaderboard events should working now: http://prntscr.com/qbsp9s
Edit: its ready to go
Twitch added a official PubSub API for reward redeems yesterday: https://dev.twitch.tv/docs/pubsub Looks like only the topic name is different
Reason why i implemented 'community-points-channel-v1' and not 'channel-points-channel-v1'
community-points-channel-v1:
channel-points-channel-v1:
Got confirmation this code has been running in a prod environment for several days.
Anyway you can provide your example of this working?
I've cloned the latest dev branch (https://github.com/TwitchLib/TwitchLib.PubSub/commit/1b4f59ef46245f31965bc3772c1ac5ee2c32b066) and I'm unable to get the events to fire.
Snippet of what isn't working:
PubSub = new TwitchPubSub(Logger);
PubSub.OnPubSubServiceConnected += RewardHelper.PubSub_OnPubSubServiceConnected;
PubSub.OnListenResponse += RewardHelper.PubSub_OnListenResponse;
PubSub.OnRewardRedeemed += RewardHelper.PubSub_OnRewardRedeemed;
PubSub.Connect();
PubSub_OnPubSubServiceConnected
Startup.PubSub.ListenToRewards("<channel id>");
Startup.PubSub.SendTopics("auth token with channel:read:redemptions set");
OnPubSubServiceConnected and OnPubSubServiceConnected both fire stating the topics were successfully subscribed to. I've tested it without the auth token and it fails to subscribe to the topic. I've set breakpoints where the message is received / parsed and that breakpoint was never hit.
Here you go: https://github.com/JayJay1989/TwitchLib.ExampleBot
Here you go: https://github.com/JayJay1989/TwitchLib.ExampleBotOp 26 jan. 2020 05:52 schreef Jonathan Rainier notifications@github.com:Anyway you can provide your example of this working? I've cloned the latest dev branch (1b4f59e) and I'm unable to get the events to fire. Snippet of what isn't working: PubSub = new TwitchPubSub(Logger); PubSub.OnPubSubServiceConnected += RewardHelper.PubSub_OnPubSubServiceConnected; PubSub.OnListenResponse += RewardHelper.PubSub_OnListenResponse; PubSub.OnRewardRedeemed += RewardHelper.PubSub_OnRewardRedeemed; PubSub.Connect(); PubSub_OnPubSubServiceConnected Startup.PubSub.ListenToRewards("
"); Startup.PubSub.SendTopics("auth token with channel:read:redemptions set"); OnPubSubServiceConnected and OnPubSubServiceConnected both fire stating the topics were successfully subscribed to. I've tested it without the auth token and it fails to subscribe to the topic. I've set breakpoints where the message is received / parsed and that breakpoint was never hit. —You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
Thank you for the prompt reply! Mine appears to be working now after no changes to my logic, I ran both side by side for a couple of days and all events are now firing.
After some reverse engineering i added following functionality:
Note: Highlighted message are part of the irc messages.