@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
38 lines (37 loc) • 1.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventSubChannelChatSharedChatSubNotificationEvent = void 0;
const tslib_1 = require("tslib");
const common_1 = require("@twurple/common");
const EventSubChannelChatBaseNotificationEvent_1 = require("./EventSubChannelChatBaseNotificationEvent");
/**
* An EventSub event representing a sub notification in another channel's chat during a shared chat session.
*/
let EventSubChannelChatSharedChatSubNotificationEvent = class EventSubChannelChatSharedChatSubNotificationEvent extends EventSubChannelChatBaseNotificationEvent_1.EventSubChannelChatBaseNotificationEvent {
constructor() {
super(...arguments);
this.type = 'shared_chat_sub';
}
/**
* The tier of the subscription.
*/
get tier() {
return this[common_1.rawDataSymbol].shared_chat_sub.sub_tier;
}
/**
* Whether the subscription was "paid" for using Prime Gaming.
*/
get isPrime() {
return this[common_1.rawDataSymbol].shared_chat_sub.is_prime;
}
/**
* The number of months the subscription is for.
*/
get durationMonths() {
return this[common_1.rawDataSymbol].shared_chat_sub.duration_months;
}
};
exports.EventSubChannelChatSharedChatSubNotificationEvent = EventSubChannelChatSharedChatSubNotificationEvent;
exports.EventSubChannelChatSharedChatSubNotificationEvent = EventSubChannelChatSharedChatSubNotificationEvent = tslib_1.__decorate([
(0, common_1.rtfm)('eventsub-base', 'EventSubChannelChatSharedChatSubNotificationEvent', 'broadcasterId')
], EventSubChannelChatSharedChatSubNotificationEvent);