UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

30 lines (29 loc) 1.25 kB
import { __decorate } from "tslib"; import { rtfm } from '@twurple/common'; import { EventSubChannelCharityCampaignStopEvent } from '../events/EventSubChannelCharityCampaignStopEvent.js'; import { EventSubSubscription } from './EventSubSubscription.js'; /** @internal */ let EventSubChannelCharityCampaignStopSubscription = class EventSubChannelCharityCampaignStopSubscription extends EventSubSubscription { _userId; /** @protected */ _cliName = 'charity-stop'; constructor(handler, client, _userId) { super(handler, client); this._userId = _userId; } get id() { return `channel.charity_campaign.stop.${this._userId}`; } get authUserId() { return this._userId; } transformData(data) { return new EventSubChannelCharityCampaignStopEvent(data, this._client._apiClient); } async _subscribe() { return await this._client._apiClient.eventSub.subscribeToChannelCharityCampaignStopEvents(this._userId, await this._getTransportOptions()); } }; EventSubChannelCharityCampaignStopSubscription = __decorate([ rtfm('eventsub-base', 'EventSubSubscription') ], EventSubChannelCharityCampaignStopSubscription); export { EventSubChannelCharityCampaignStopSubscription };