claim_moment

This commit is contained in:
Roman Davydov
2023-03-07 16:34:37 +03:00
parent 8d9eba3956
commit 28383ab71c
2 changed files with 15 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ class Events(Enum):
BET_FAILED = auto()
BET_START = auto()
BONUS_CLAIM = auto()
MOMENT_CLAIM = auto()
JOIN_RAID = auto()
DROP_CLAIM = auto()
DROP_STATUS = auto()

View File

@@ -649,6 +649,20 @@ class Twitch(object):
}
self.post_gql_request(json_data)
# === MOMENTS === #
def claim_moment(self, streamer, moment_id):
if Settings.logger.less is False:
logger.info(
f"Claiming the moment for {streamer}!",
extra={"emoji": ":gift:", "event": Events.MOMENT_CLAIM},
)
json_data = copy.deepcopy(GQLOperations.CommunityMomentCallout_Claim)
json_data["variables"] = {
"input": {"momentID": moment_id}
}
self.post_gql_request(json_data)
# === CAMPAIGNS / DROPS / INVENTORY === #
def __get_campaign_ids_from_streamer(self, streamer):
json_data = copy.deepcopy(