listen to topic and claim moments

This commit is contained in:
Roman Davydov
2023-03-07 17:15:23 +03:00
parent 28383ab71c
commit 954575c9f4
2 changed files with 13 additions and 0 deletions

View File

@@ -242,6 +242,13 @@ class WebSocketsPool:
ws.twitch.update_raid(
ws.streamers[streamer_index], raid)
elif message.topic == "community-moments-channel-v1":
if message.type == "active":
ws.twitch.claim_moment(
ws.streamers[streamer_index],
message.data["moment_id"]
)
elif message.topic == "predictions-channel-v1":
event_dict = message.data["event"]