@twurple/eventsub-base
Version:
Base for the other Twurple EventSub packages
43 lines (42 loc) • 1.46 kB
JavaScript
import { __decorate } from "tslib";
import { rawDataSymbol, rtfm } from '@twurple/common';
import { EventSubChannelBaseModerationEvent } from './EventSubChannelBaseModerationEvent.js';
/**
* An EventSub event representing a moderator managing AutoMod terms on a channel.
*/
let EventSubChannelAutoModTermsModerationEvent = class EventSubChannelAutoModTermsModerationEvent extends EventSubChannelBaseModerationEvent {
moderationAction;
/** @internal */
constructor(data, action, client) {
super(data, client);
this.moderationAction = action;
}
/**
* Whether the terms were added or removed.
*/
get action() {
return this[rawDataSymbol].automod_terms.action;
}
/**
* Whether the terms are blocked or permitted.
*/
get list() {
return this[rawDataSymbol].automod_terms.list;
}
/**
* The list of terms being added or removed.
*/
get terms() {
return this[rawDataSymbol].automod_terms.terms;
}
/**
* Whether the terms were added/removed due to an Automod resolution action.
*/
get fromAutoMod() {
return this[rawDataSymbol].automod_terms.from_automod;
}
};
EventSubChannelAutoModTermsModerationEvent = __decorate([
rtfm('eventsub-base', 'EventSubChannelAutoModTermsModerationEvent', 'broadcasterId')
], EventSubChannelAutoModTermsModerationEvent);
export { EventSubChannelAutoModTermsModerationEvent };