@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
32 lines (31 loc) • 1.26 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 another channel's chat during a shared chat session.
*/
let EventSubChannelChatSharedChatSubNotificationEvent = class EventSubChannelChatSharedChatSubNotificationEvent extends EventSubChannelChatBaseNotificationEvent {
type = 'shared_chat_sub';
/**
* The tier of the subscription.
*/
get tier() {
return this[rawDataSymbol].shared_chat_sub.sub_tier;
}
/**
* Whether the subscription was "paid" for using Prime Gaming.
*/
get isPrime() {
return this[rawDataSymbol].shared_chat_sub.is_prime;
}
/**
* The number of months the subscription is for.
*/
get durationMonths() {
return this[rawDataSymbol].shared_chat_sub.duration_months;
}
};
EventSubChannelChatSharedChatSubNotificationEvent = __decorate([
rtfm('eventsub-base', 'EventSubChannelChatSharedChatSubNotificationEvent', 'broadcasterId')
], EventSubChannelChatSharedChatSubNotificationEvent);
export { EventSubChannelChatSharedChatSubNotificationEvent };