PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
791 stars 163 forks source link

CustomReward _init_ not compatible with EventSub data #254

Closed Ragnatz closed 2 years ago

Ragnatz commented 2 years ago

rewards.py lines 71-74 try to get a broadcaster_id or channel_id from the data object that is passed in. However, the reward data sent from twitch contains only 4 fields: Id, Title, Cost, and Prompt.

As such, the creation of the CustomReward in /eventsub/models.py line 437 breaks any method attempting to use that data.

kamalmostafa commented 2 years ago

I hit this problem as well, and debugged my way to discovering this bug report and its associated pull request (which DOES fix CustomReward handling for me! Thanks!!)