UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

35 lines (34 loc) 1.15 kB
import { __decorate } from "tslib"; import { rawDataSymbol, rtfm } from '@twurple/common'; import { EventSubChannelBaseModerationEvent } from "./EventSubChannelBaseModerationEvent.mjs"; /** * An EventSub event representing a user having gained moderator status on a channel. */ let EventSubChannelModModerationEvent = class EventSubChannelModModerationEvent extends EventSubChannelBaseModerationEvent { constructor() { super(...arguments); this.moderationAction = 'mod'; } /** * The ID of the user gaining mod status. */ get userId() { return this[rawDataSymbol].mod.user_id; } /** * The name of the user gaining mod status. */ get userName() { return this[rawDataSymbol].mod.user_login; } /** * The display name of the user gaining mod status. */ get userDisplayName() { return this[rawDataSymbol].mod.user_name; } }; EventSubChannelModModerationEvent = __decorate([ rtfm('eventsub-base', 'EventSubChannelModModerationEvent', 'broadcasterId') ], EventSubChannelModModerationEvent); export { EventSubChannelModModerationEvent };