claim_moment
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user