From fa7236af63ccc5dda21d314aa501bae6ef5ff856 Mon Sep 17 00:00:00 2001 From: anopem Date: Sun, 21 Jul 2024 23:08:22 +0200 Subject: [PATCH] Get viewer count from stream data instead of user profile data (#6413) --- redbot/cogs/streams/streamtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbot/cogs/streams/streamtypes.py b/redbot/cogs/streams/streamtypes.py index 5c7290eb4be..bfdb3f52734 100644 --- a/redbot/cogs/streams/streamtypes.py +++ b/redbot/cogs/streams/streamtypes.py @@ -393,7 +393,6 @@ 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"] @@ -401,6 +400,7 @@ async def is_online(self): 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}