mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-04 03:19:37 +00:00
Minor consistency changes
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -102,7 +102,7 @@ class BaseDrop:
|
||||
async def claim(self) -> bool:
|
||||
result = await self._claim()
|
||||
if result:
|
||||
self.is_claimed = True
|
||||
self.is_claimed = result
|
||||
# notify the campaign about claiming
|
||||
# this will cause it to call our _on_claim, so no need to call it ourselves here
|
||||
self.campaign._on_claim()
|
||||
|
||||
Reference in New Issue
Block a user