diff --git a/twitchio/models/streams.py b/twitchio/models/streams.py index e6a7070a..d490ada2 100644 --- a/twitchio/models/streams.py +++ b/twitchio/models/streams.py @@ -101,8 +101,8 @@ def __init__(self, data: StreamsResponseData, *, http: HTTPClient) -> None: self.id: str = data["id"] self.user = PartialUser(data["user_id"], data["user_login"], data["user_name"], http=http) - self.game_id: str | None = data["game_id"] - self.game_name: str | None = data["game_name"] + self.game_id: str | None = data["game_id"] or None + self.game_name: str | None = data["game_name"] or None self.type: str = data["type"] self.title: str = data["title"] self.viewer_count: int = data["viewer_count"] diff --git a/twitchio/types_/responses.py b/twitchio/types_/responses.py index 4d4ddc27..ef395369 100644 --- a/twitchio/types_/responses.py +++ b/twitchio/types_/responses.py @@ -1451,8 +1451,9 @@ class StreamsResponseData(TypedDict): user_id: str user_login: str user_name: str - game_id: str | None - game_name: str | None + # Game ID and name are empty when no category is set + game_id: str + game_name: str type: Literal["live", ""] title: str tags: list[str]