@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
38 lines (37 loc) • 1.33 kB
JavaScript
import { __decorate } from "tslib";
import { rawDataSymbol, rtfm } from '@twurple/common';
import { EventSubChannelBaseModerationEvent } from './EventSubChannelBaseModerationEvent.js';
/**
* An EventSub event representing a moderator removing a timeout from a user on a channel.
*/
let EventSubChannelUntimeoutModerationEvent = class EventSubChannelUntimeoutModerationEvent extends EventSubChannelBaseModerationEvent {
moderationAction = 'untimeout';
/**
* The ID of the user being untimed out.
*/
get userId() {
return this[rawDataSymbol].untimeout.user_id;
}
/**
* The name of the user being untimed out.
*/
get userName() {
return this[rawDataSymbol].untimeout.user_login;
}
/**
* The display name of the user being untimed out.
*/
get userDisplayName() {
return this[rawDataSymbol].untimeout.user_name;
}
/**
* Gets more information about the user.
*/
async getUser() {
return await this._client.users.getUserById(this[rawDataSymbol].untimeout.user_id);
}
};
EventSubChannelUntimeoutModerationEvent = __decorate([
rtfm('eventsub-base', 'EventSubChannelUntimeoutModerationEvent', 'broadcasterId')
], EventSubChannelUntimeoutModerationEvent);
export { EventSubChannelUntimeoutModerationEvent };