@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
32 lines (31 loc) • 1.08 kB
JavaScript
import { __decorate } from "tslib";
import { rawDataSymbol, rtfm } from '@twurple/common';
import { EventSubChannelBaseModerationEvent } from './EventSubChannelBaseModerationEvent.js';
/**
* An EventSub event representing a user having gained moderator status on a channel.
*/
let EventSubChannelModModerationEvent = class EventSubChannelModModerationEvent extends EventSubChannelBaseModerationEvent {
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 };