UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

39 lines (38 loc) 1.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventSubAutoModMessageAutoMod = void 0; const tslib_1 = require("tslib"); const common_1 = require("@twurple/common"); const EventSubAutoModMessageAutoModBoundary_1 = require("./EventSubAutoModMessageAutoModBoundary"); /** * An object representing an AutoMod violation data if the massage caught by AutoMod. */ let EventSubAutoModMessageAutoMod = class EventSubAutoModMessageAutoMod extends common_1.DataObject { /** @internal */ constructor(data, _messageText) { super(data); this._messageText = _messageText; } /** * The category of the caught message. */ get category() { return this[common_1.rawDataSymbol].category; } /** * The level of severity. */ get level() { return this[common_1.rawDataSymbol].level; } /** * The bounds of the text that caused the message to be caught. */ get boundaries() { return this[common_1.rawDataSymbol].boundaries.map(boundary => new EventSubAutoModMessageAutoModBoundary_1.EventSubAutoModMessageAutoModBoundary(boundary, this._messageText)); } }; exports.EventSubAutoModMessageAutoMod = EventSubAutoModMessageAutoMod; exports.EventSubAutoModMessageAutoMod = EventSubAutoModMessageAutoMod = tslib_1.__decorate([ (0, common_1.rtfm)('eventsub-base', 'EventSubAutoModMessageAutoMod') ], EventSubAutoModMessageAutoMod);