Minor consistency changes

This commit is contained in:
DevilXD committed 2022-05-15 14:44:06 +02:00
1 parent fcbda8fea2
commit c77b8f6714
2 files changed
+3 -5

No files matched your search

+2 -4
View File
@@ -230,11 +230,9 @@ class Channel:
return URLType(match.group(1))
async def get_stream(self) -> Stream | None:
response: JsonType | None = await self._twitch.gql_request(
response: JsonType = await self._twitch.gql_request(
GQL_OPERATIONS["GetStreamInfo"].with_variables({"channel": self._login})
)
if not response:
return None
stream_data: JsonType | None = response["data"]["user"]
if not stream_data:
return None
@@ -295,7 +293,7 @@ class Channel:
"""
This claims bonus points if they're available, and fills out the 'points' attribute.
"""
response = await self._twitch.gql_request(
response: JsonType = await self._twitch.gql_request(
GQL_OPERATIONS["ChannelPointsContext"].with_variables({"channelLogin": self._login})
)
channel_data: JsonType = response["data"]["community"]["channel"]