@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
44 lines (43 loc) • 1.8 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventSubChannelSharedChatUnbanModerationEvent = void 0;
const tslib_1 = require("tslib");
const common_1 = require("@twurple/common");
const EventSubChannelBaseModerationEvent_1 = require("./EventSubChannelBaseModerationEvent");
/**
* An EventSub event representing a moderator unbanning a user in another channel during a shared chat session.
*/
let EventSubChannelSharedChatUnbanModerationEvent = class EventSubChannelSharedChatUnbanModerationEvent extends EventSubChannelBaseModerationEvent_1.EventSubChannelBaseModerationEvent {
constructor() {
super(...arguments);
this.moderationAction = 'shared_chat_unban';
}
/**
* The ID of the user being unbanned.
*/
get userId() {
return this[common_1.rawDataSymbol].shared_chat_unban.user_id;
}
/**
* The name of the user being unbanned.
*/
get userName() {
return this[common_1.rawDataSymbol].shared_chat_unban.user_login;
}
/**
* The display name of the user being unbanned.
*/
get userDisplayName() {
return this[common_1.rawDataSymbol].shared_chat_unban.user_name;
}
/**
* Gets more information about the user.
*/
async getUser() {
return await this._client.users.getUserById(this[common_1.rawDataSymbol].shared_chat_unban.user_id);
}
};
exports.EventSubChannelSharedChatUnbanModerationEvent = EventSubChannelSharedChatUnbanModerationEvent;
exports.EventSubChannelSharedChatUnbanModerationEvent = EventSubChannelSharedChatUnbanModerationEvent = tslib_1.__decorate([
(0, common_1.rtfm)('eventsub-base', 'EventSubChannelSharedChatUnbanModerationEvent', 'broadcasterId')
], EventSubChannelSharedChatUnbanModerationEvent);