From d333c86598ba00871a1b24a3b93d2c5954dd93a2 Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:12:44 +0200 Subject: [PATCH] Handle GetStreamInfo returning None for suspended channels --- twitch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twitch.py b/twitch.py index a142099..4a5b29d 100644 --- a/twitch.py +++ b/twitch.py @@ -1633,7 +1633,8 @@ class Twitch: response_list: list[JsonType] = await coro for response_json in response_list: channel_data: JsonType = response_json["data"]["user"] - acl_streams_map[int(channel_data["id"])] = channel_data + if channel_data is not None: + acl_streams_map[int(channel_data["id"])] = channel_data except Exception: # asyncio.as_completed doesn't cancel tasks on errors for task in stream_gql_tasks: