diff --git a/channel.py b/channel.py index 14ff010..6b30c3a 100644 --- a/channel.py +++ b/channel.py @@ -255,7 +255,15 @@ class Channel: self._display_name = stream_data["displayName"] if not stream_data["stream"]: return None - return Stream.from_get_stream(self, stream_data) + stream = Stream.from_get_stream(self, stream_data) + available_drops: JsonType = await self._twitch.gql_request( + GQL_OPERATIONS["AvailableDrops"].with_variables({"channelID": str(self.id)}) + ) + stream.drops_enabled = any( + bool(c["timeBasedDrops"]) + for c in available_drops["data"]["channel"]["viewerDropCampaigns"] + ) + return stream async def update_stream(self, *, trigger_events: bool) -> bool: """ diff --git a/constants.py b/constants.py index 0c94030..bf4da82 100644 --- a/constants.py +++ b/constants.py @@ -297,7 +297,7 @@ GQL_OPERATIONS: dict[str, GQLOperation] = { }, ), # returns drops available for a particular channel (unused) - "ChannelDrops": GQLOperation( + "AvailableDrops": GQLOperation( "DropsHighlightService_AvailableDrops", "9a62a09bce5b53e26e64a671e530bc599cb6aab1e5ba3cbd5d85966d3940716f", variables={