UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

38 lines (37 loc) 1.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventSubChannelModModerationEvent = void 0; const tslib_1 = require("tslib"); const common_1 = require("@twurple/common"); const EventSubChannelBaseModerationEvent_1 = require("./EventSubChannelBaseModerationEvent"); /** * An EventSub event representing a user having gained moderator status on a channel. */ let EventSubChannelModModerationEvent = class EventSubChannelModModerationEvent extends EventSubChannelBaseModerationEvent_1.EventSubChannelBaseModerationEvent { constructor() { super(...arguments); this.moderationAction = 'mod'; } /** * The ID of the user gaining mod status. */ get userId() { return this[common_1.rawDataSymbol].mod.user_id; } /** * The name of the user gaining mod status. */ get userName() { return this[common_1.rawDataSymbol].mod.user_login; } /** * The display name of the user gaining mod status. */ get userDisplayName() { return this[common_1.rawDataSymbol].mod.user_name; } }; exports.EventSubChannelModModerationEvent = EventSubChannelModModerationEvent; exports.EventSubChannelModModerationEvent = EventSubChannelModModerationEvent = tslib_1.__decorate([ (0, common_1.rtfm)('eventsub-base', 'EventSubChannelModModerationEvent', 'broadcasterId') ], EventSubChannelModModerationEvent);