@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
32 lines (31 loc) • 1.12 kB
JavaScript
import { __decorate } from "tslib";
import { rawDataSymbol, rtfm } from '@twurple/common';
import { EventSubChannelChatBaseNotificationEvent } from './EventSubChannelChatBaseNotificationEvent.js';
/**
* An EventSub event representing a sub notification in a channel's chat.
*/
let EventSubChannelChatSubNotificationEvent = class EventSubChannelChatSubNotificationEvent extends EventSubChannelChatBaseNotificationEvent {
type = 'sub';
/**
* The tier of the subscription.
*/
get tier() {
return this[rawDataSymbol].sub.sub_tier;
}
/**
* Whether the subscription was "paid" for using Prime Gaming.
*/
get isPrime() {
return this[rawDataSymbol].sub.is_prime;
}
/**
* The number of months the subscription is for.
*/
get durationMonths() {
return this[rawDataSymbol].sub.duration_months;
}
};
EventSubChannelChatSubNotificationEvent = __decorate([
rtfm('eventsub-base', 'EventSubChannelChatResubNotificationEvent', 'broadcasterId')
], EventSubChannelChatSubNotificationEvent);
export { EventSubChannelChatSubNotificationEvent };