Closed zang227 closed 1 year ago
psClient.SendTopics()
(and be sure to pass the broadcaster's access token with the channel:read:redemptions
scope) - you can do this call within onPubSubServiceConnected
psClient = new TwitchPubSub();
psClient.OnPubSubServiceConnected += OnPubSubServiceConnected;
psClient.OnChannelPointsRewardRedeemed += PsClient_OnChannelPointsRewardRedeemed;
psClient.ListenToChannelPoints("38802591");
psClient.SendTopics(streamerAuthKey);
psClient.Connect();
I've added it (not sure if its in the right place or correctly configured [not sure if i need to define topics to be sent?]) but I'm still not getting an event. And I can confirm both the streamer authkey has every scope enabled, and that the reward is custom.
Actually I see from the example code that the sendtopics goes after establishing connection. Adding that has fixed my issue thank you!
psClient = new TwitchPubSub(); psClient.OnPubSubServiceConnected += OnPubSubServiceConnected; psClient.OnChannelPointsRewardRedeemed += PsClient_OnChannelPointsRewardRedeemed; psClient.ListenToChannelPoints("38802591"); psClient.Connect(); `
private void PsClient_OnChannelPointsRewardRedeemed(object? sender, TwitchLib.PubSub.Events.OnChannelPointsRewardRedeemedArgs e) { if(e.RewardRedeemed.ToString() != null) { UpdateChatBox(e.RewardRedeemed.ToString()); } }
I've got this code, and when I redeem a channel point reward it never reaches PsClient_OnChannelPointsRewardRedeemed