Skip to content

Commit

Permalink
Get viewer count from stream data instead of user profile data (#6413)
Browse files Browse the repository at this point in the history
  • Loading branch information
anopem authored Jul 21, 2024
1 parent 601816a commit fa7236a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redbot/cogs/streams/streamtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ async def is_online(self):
if user_profile_data is not None:
final_data["login"] = user_profile_data["login"]
final_data["profile_image_url"] = user_profile_data["profile_image_url"]
final_data["view_count"] = user_profile_data["view_count"]

stream_data = stream_data["data"][0]
final_data["user_name"] = self.display_name = stream_data["user_name"]
final_data["game_name"] = stream_data["game_name"]
final_data["thumbnail_url"] = stream_data["thumbnail_url"]
final_data["title"] = stream_data["title"]
final_data["type"] = stream_data["type"]
final_data["view_count"] = stream_data["viewer_count"]

__, follows_data = await self.get_data(
TWITCH_FOLLOWS_ENDPOINT, {"broadcaster_id": self.id}
Expand Down

0 comments on commit fa7236a

Please sign in to comment.