UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

39 lines (38 loc) 1.61 kB
import { __decorate } from "tslib"; import { rawDataSymbol, rtfm } from '@twurple/common'; import { EventSubChannelChatBaseNotificationEvent } from './EventSubChannelChatBaseNotificationEvent.js'; /** * An EventSub event representing a community sub gift notification in another channel's chat during a shared chat * session. */ let EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent = class EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent extends EventSubChannelChatBaseNotificationEvent { type = 'shared_chat_community_sub_gift'; /** * The ID of the community sub gift. */ get id() { return this[rawDataSymbol].shared_chat_community_sub_gift.id; } /** * The tier of the subscriptions. */ get tier() { return this[rawDataSymbol].shared_chat_community_sub_gift.sub_tier; } /** * The amount of gifts that are part of this community sub gift. */ get amount() { return this[rawDataSymbol].shared_chat_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[rawDataSymbol].shared_chat_community_sub_gift.cumulative_total; } }; EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent = __decorate([ rtfm('eventsub-base', 'EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent', 'broadcasterId') ], EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent); export { EventSubChannelChatSharedChatCommunitySubGiftNotificationEvent };