UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

44 lines (43 loc) 1.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventSubChannelChatCommunitySubGiftNotificationEvent = void 0; const tslib_1 = require("tslib"); const common_1 = require("@twurple/common"); const EventSubChannelChatBaseNotificationEvent_1 = require("./EventSubChannelChatBaseNotificationEvent"); /** * An EventSub event representing a community sub gift notification in a channel's chat. */ let EventSubChannelChatCommunitySubGiftNotificationEvent = class EventSubChannelChatCommunitySubGiftNotificationEvent extends EventSubChannelChatBaseNotificationEvent_1.EventSubChannelChatBaseNotificationEvent { constructor() { super(...arguments); this.type = 'community_sub_gift'; } /** * The ID of the community sub gift. */ get id() { return this[common_1.rawDataSymbol].community_sub_gift.id; } /** * The tier of the subscriptions. */ get tier() { return this[common_1.rawDataSymbol].community_sub_gift.sub_tier; } /** * The amount of gifts that are part of this community sub gift. */ get amount() { return this[common_1.rawDataSymbol].community_sub_gift.total; } /** * The amount of gifts that the gifter has sent in total, or `null` the gift is anonymous. */ get cumulativeAmount() { return this[common_1.rawDataSymbol].community_sub_gift.cumulative_total; } }; exports.EventSubChannelChatCommunitySubGiftNotificationEvent = EventSubChannelChatCommunitySubGiftNotificationEvent; exports.EventSubChannelChatCommunitySubGiftNotificationEvent = EventSubChannelChatCommunitySubGiftNotificationEvent = tslib_1.__decorate([ (0, common_1.rtfm)('eventsub-base', 'EventSubChannelChatCommunitySubGiftNotificationEvent', 'broadcasterId') ], EventSubChannelChatCommunitySubGiftNotificationEvent);