@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
26 lines (25 loc) • 1.14 kB
JavaScript
import { __decorate } from "tslib";
import { rawDataSymbol, rtfm } from '@twurple/common';
import { EventSubChannelChatBaseNotificationEvent } from './EventSubChannelChatBaseNotificationEvent.js';
/**
* An EventSub event representing a Watch Streak notification in a channel's chat.
*/
let EventSubChannelChatWatchStreakNotificationEvent = class EventSubChannelChatWatchStreakNotificationEvent extends EventSubChannelChatBaseNotificationEvent {
type = 'watch_streak';
/**
* The number of consecutive broadcasts for which the user has been watching.
*/
get streakCount() {
return this[rawDataSymbol].watch_streak.streak_count;
}
/**
* The number of channel points awarded for the Watch Streak milestone.
*/
get channelPointsAwarded() {
return this[rawDataSymbol].watch_streak.channel_points_awarded;
}
};
EventSubChannelChatWatchStreakNotificationEvent = __decorate([
rtfm('eventsub-base', 'EventSubChannelChatWatchStreakNotificationEvent', 'broadcasterId')
], EventSubChannelChatWatchStreakNotificationEvent);
export { EventSubChannelChatWatchStreakNotificationEvent };