@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
45 lines (44 loc) • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventSubChannelAutoModTermsModerationEvent = void 0;
const tslib_1 = require("tslib");
const common_1 = require("@twurple/common");
const EventSubChannelBaseModerationEvent_1 = require("./EventSubChannelBaseModerationEvent");
/**
* An EventSub event representing a moderator managing AutoMod terms on a channel.
*/
let EventSubChannelAutoModTermsModerationEvent = class EventSubChannelAutoModTermsModerationEvent extends EventSubChannelBaseModerationEvent_1.EventSubChannelBaseModerationEvent {
/** @internal */
constructor(data, action, client) {
super(data, client);
this.moderationAction = action;
}
/**
* Whether the terms were added or removed.
*/
get action() {
return this[common_1.rawDataSymbol].automod_terms.action;
}
/**
* Whether the terms are blocked or permitted.
*/
get list() {
return this[common_1.rawDataSymbol].automod_terms.list;
}
/**
* The list of terms being added or removed.
*/
get terms() {
return this[common_1.rawDataSymbol].automod_terms.terms;
}
/**
* Whether the terms were added/removed due to an Automod resolution action.
*/
get fromAutoMod() {
return this[common_1.rawDataSymbol].automod_terms.from_automod;
}
};
exports.EventSubChannelAutoModTermsModerationEvent = EventSubChannelAutoModTermsModerationEvent;
exports.EventSubChannelAutoModTermsModerationEvent = EventSubChannelAutoModTermsModerationEvent = tslib_1.__decorate([
(0, common_1.rtfm)('eventsub-base', 'EventSubChannelAutoModTermsModerationEvent', 'broadcasterId')
], EventSubChannelAutoModTermsModerationEvent);