Open NanoSNAkeR opened 3 years ago
I can confirm I'm having the exact same issue. My code is identical to yours.
I have the same issue, reverted back to ListenToRewards. It's strangely linked to rewards with images. If they don't have images, it's working (but you need to restart your app first : first rewards with images will break the event entirely)
I have the same issue, reverted back to ListenToRewards. It's strangely linked to rewards with images. If they don't have images, it's working (but you need to restart your app first : first rewards with images will break the event entirely)
Yeah, I also traced the problem to the new channel points function but I didn't know the images were the actual problem... most curious. Switched to the ListenToRewards as well and it seems to work like a charm. Also found out that the Whisper function can also cause some problems too...
Just wanted to chime in--had the same issue, switching back to the old OnRewardRedeemed system worked just fine :)
I'm wondering why the custom image messes the redeem up--it must have something to do with how the message is formatted; the reward listener is looking for a specific first arg, but that arg must change to be the image when one is present.
I can confirm that OnChannelPointsRewardRedeemed still has problems with custom reward icons.
To give closure to this issue (and because I invested nearly 6 hours going on the same journey as the rest of the guys here)
The bug was using an older version of PubSub, which had incorrectly set the Image object as String instead of an object - hence the String parser threw up an "unexpected character {". Curly braces are not how you start a string. It was fixed at a later date than the current Release https://github.com/TwitchLib/TwitchLib.PubSub/commit/e65f966e47c3f9a171b8cf4f58a8b92cab2f839a#diff-dd87ee3df01f86fd8eb906d454236162c2742a7f7e0d0d81623fc910c1153660
The current pre-release version has this fix already applied.
Sorry for the necro, but this problem drove me up a wall and I thought it only fair to have at least one more issue semi-closed
I will try that and report today if the pre-release version indeed fixed it on my end. Thanks for letting me know!
EDIT: Hmm, it doesn't like it's working with PubSub version 3.2.3, which has the fix. I tried using the following code in a basic Console App using Visual Studio 2022:
using TwitchLib.PubSub;
using TwitchLib.PubSub.Events;
TwitchPubSub _pubSub = new TwitchPubSub();
_pubSub.OnPubSubServiceConnected += OnPubSubServiceConnected;
_pubSub.OnChannelPointsRewardRedeemed += OnChannelPointsRewardRedeemed;
_pubSub.ListenToChannelPoints("63469890");
_pubSub.Connect();
void OnChannelPointsRewardRedeemed(object? sender, OnChannelPointsRewardRedeemedArgs e)
{
Console.WriteLine(e.RewardRedeemed.Redemption.Reward.Title);
}
void OnPubSubServiceConnected(object? sender, EventArgs e)
{
_pubSub.SendTopics();
Console.WriteLine("Connected to Twitch! Press Escape to exit.");
}
ConsoleKeyInfo input;
do
{
input = Console.ReadKey();
} while (input.Key != ConsoleKey.Escape);
It works perfectly fine with the deprecated functions however.
I will try that and report today if the pre-release version indeed fixed it on my end. Thanks for letting me know!
EDIT: Hmm, it doesn't like it's working with PubSub version 3.2.3, which has the fix. I tried using the following code in a basic Console App using Visual Studio 2022:
using TwitchLib.PubSub; using TwitchLib.PubSub.Events; TwitchPubSub _pubSub = new TwitchPubSub(); _pubSub.OnPubSubServiceConnected += OnPubSubServiceConnected; _pubSub.OnChannelPointsRewardRedeemed += OnChannelPointsRewardRedeemed; _pubSub.ListenToChannelPoints("63469890"); _pubSub.Connect(); void OnChannelPointsRewardRedeemed(object? sender, OnChannelPointsRewardRedeemedArgs e) { Console.WriteLine(e.RewardRedeemed.Redemption.Reward.Title); } void OnPubSubServiceConnected(object? sender, EventArgs e) { _pubSub.SendTopics(); Console.WriteLine("Connected to Twitch! Press Escape to exit."); } ConsoleKeyInfo input; do { input = Console.ReadKey(); } while (input.Key != ConsoleKey.Escape);
It works perfectly fine with the deprecated functions however.
It does seem to work fine, I think you were just missing OAuth in SendTopics
The issue persists even with the most up to date version of this library despite what's said in the comments. Even with OAuth properly authorized and sent via SendTopics it's the OnChannelPointsRewardRedeemed
function that causes PubSub to crash, using OnRewardRedeemed
fixed everything.
The issue persists even with the most up to date version of this library despite what's said in the comments. Even with OAuth properly authorized and sent via SendTopics it's the OnChannelPointsRewardRedeemed function that causes PubSub to crash, using OnRewardRedeemed fixed everything.
i'm facing the same issue of it not firing, are you still using client.ListenToRewards(id);
or are you using client.ListenToChannelPoints(id);
?
The issue persists even with the most up to date version of this library despite what's said in the comments. Even with OAuth properly authorized and sent via SendTopics it's the OnChannelPointsRewardRedeemed function that causes PubSub to crash, using OnRewardRedeemed fixed everything.
i'm facing the same issue of it not firing, are you still using
client.ListenToRewards(id);
or are you usingclient.ListenToChannelPoints(id);
?
ListenToRewards(id) is what I use and it works
I Started having problems with the PubSub service all of a sudden, It's not getting any input from twitch events. The strange thing is it used to work without a problem right before I started a stream, now it just says that everything connects successfully but it doesn't register any events incoming from Twitch, like channel points redeems, whispers or follows... I don't know what else to do...
Here's my code:
And here's the console log for the script... as you can see it verifies everything successfully...
Also the other services, such as the Client and the API work correctly without any errors, bot reads chat, reads viewers, can answer to callouts etc...
If anyone can help I would appreciate it a lot!