UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

38 lines (37 loc) 1.3 kB
import { __decorate } from "tslib"; import { rawDataSymbol, rtfm } from '@twurple/common'; import { EventSubChannelBaseModerationEvent } from './EventSubChannelBaseModerationEvent.js'; /** * An EventSub event representing a moderator canceling the raid on a channel. */ let EventSubChannelUnraidModerationEvent = class EventSubChannelUnraidModerationEvent extends EventSubChannelBaseModerationEvent { moderationAction = 'unraid'; /** * The ID of the user no longer being raided. */ get userId() { return this[rawDataSymbol].unraid.user_id; } /** * The name of the user no longer being raided. */ get userName() { return this[rawDataSymbol].unraid.user_login; } /** * The display name of the user no longer being raided. */ get userDisplayName() { return this[rawDataSymbol].unraid.user_name; } /** * Gets more information about the user. */ async getUser() { return await this._client.users.getUserById(this[rawDataSymbol].unraid.user_id); } }; EventSubChannelUnraidModerationEvent = __decorate([ rtfm('eventsub-base', 'EventSubChannelUnraidModerationEvent', 'broadcasterId') ], EventSubChannelUnraidModerationEvent); export { EventSubChannelUnraidModerationEvent };