UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

27 lines (26 loc) 1.22 kB
import { __decorate } from "tslib"; import { rawDataSymbol, rtfm } from '@twurple/common'; import { EventSubChannelCharityAmount } from '../common/EventSubChannelCharityAmount.js'; import { EventSubChannelChatBaseNotificationEvent } from './EventSubChannelChatBaseNotificationEvent.js'; /** * An EventSub event representing a notification for a charity donation in a channel's chat. */ let EventSubChannelChatCharityDonationNotificationEvent = class EventSubChannelChatCharityDonationNotificationEvent extends EventSubChannelChatBaseNotificationEvent { type = 'charity_donation'; /** * The name of the charity that was donated to. */ get charityName() { return this[rawDataSymbol].charity_donation.charity_name; } /** * The amount of money that was donated. */ get amount() { return new EventSubChannelCharityAmount(this[rawDataSymbol].charity_donation.amount); } }; EventSubChannelChatCharityDonationNotificationEvent = __decorate([ rtfm('eventsub-base', 'EventSubChannelChatCharityDonationNotificationEvent', 'broadcasterId') ], EventSubChannelChatCharityDonationNotificationEvent); export { EventSubChannelChatCharityDonationNotificationEvent };