UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

33 lines (32 loc) 1.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventSubChannelChatCharityDonationNotificationEvent = void 0; const tslib_1 = require("tslib"); const common_1 = require("@twurple/common"); const EventSubChannelCharityAmount_1 = require("../common/EventSubChannelCharityAmount"); const EventSubChannelChatBaseNotificationEvent_1 = require("./EventSubChannelChatBaseNotificationEvent"); /** * An EventSub event representing a notification for a charity donation in a channel's chat. */ let EventSubChannelChatCharityDonationNotificationEvent = class EventSubChannelChatCharityDonationNotificationEvent extends EventSubChannelChatBaseNotificationEvent_1.EventSubChannelChatBaseNotificationEvent { constructor() { super(...arguments); this.type = 'charity_donation'; } /** * The name of the charity that was donated to. */ get charityName() { return this[common_1.rawDataSymbol].charity_donation.charity_name; } /** * The amount of money that was donated. */ get amount() { return new EventSubChannelCharityAmount_1.EventSubChannelCharityAmount(this[common_1.rawDataSymbol].charity_donation.amount); } }; exports.EventSubChannelChatCharityDonationNotificationEvent = EventSubChannelChatCharityDonationNotificationEvent; exports.EventSubChannelChatCharityDonationNotificationEvent = EventSubChannelChatCharityDonationNotificationEvent = tslib_1.__decorate([ (0, common_1.rtfm)('eventsub-base', 'EventSubChannelChatCharityDonationNotificationEvent', 'broadcasterId') ], EventSubChannelChatCharityDonationNotificationEvent);