From e87450b1d67b9f16c466a6341d6d0a1bf1becc1d Mon Sep 17 00:00:00 2001 From: Tycho Bellers Date: Tue, 18 Oct 2022 21:21:37 -0700 Subject: [PATCH] add raid community points earn reason --- src/notifiers/notifier.ts | 8 +++++++- src/web_socket_listener.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/notifiers/notifier.ts b/src/notifiers/notifier.ts index 253c4f6..3d12c9a 100644 --- a/src/notifiers/notifier.ts +++ b/src/notifiers/notifier.ts @@ -11,7 +11,7 @@ interface EventOptions_DropClaimed { gameIds: string[] } -export type Event_CommunityPointsEarned_ClaimReason = "watch" | "claim" | "watch_streak"; +export type Event_CommunityPointsEarned_ClaimReason = "watch" | "claim" | "watch_streak" | "raid"; interface Event_CommunityPointsEarned { reasons: Event_CommunityPointsEarned_ClaimReason[] @@ -82,6 +82,12 @@ export abstract class Notifier { return; } break; + + case "RAID": + if (!options.reasons.includes("raid")) { + return; + } + break; } } await this.notifyOnCommunityPointsEarned(data, channelLogin); diff --git a/src/web_socket_listener.ts b/src/web_socket_listener.ts index f8977e4..2df4cf0 100644 --- a/src/web_socket_listener.ts +++ b/src/web_socket_listener.ts @@ -17,7 +17,7 @@ export interface CommunityPointsUserV1_PointsEarned { channel_id: string, total_points: number, baseline_points: number, - reason_code: "WATCH" | "CLAIM" | "WATCH_STREAK", + reason_code: "WATCH" | "CLAIM" | "WATCH_STREAK" | "RAID", multipliers: any[] }, balance: {