Skip to content

Commit

Permalink
add raid community points earn reason
Browse files Browse the repository at this point in the history
  • Loading branch information
TychoTheTaco committed Oct 19, 2022
1 parent b116f99 commit e87450b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/notifiers/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down Expand Up @@ -82,6 +82,12 @@ export abstract class Notifier {
return;
}
break;

case "RAID":
if (!options.reasons.includes("raid")) {
return;
}
break;
}
}
await this.notifyOnCommunityPointsEarned(data, channelLogin);
Expand Down
2 changes: 1 addition & 1 deletion src/web_socket_listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit e87450b

Please sign in to comment.