seyfert
Version:
The most advanced framework for discord bots
23 lines (22 loc) • 705 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModalCommand = void 0;
const componentcommand_1 = require("./componentcommand");
class ModalCommand {
type = componentcommand_1.InteractionCommandType.MODAL;
customId;
/** @internal */
_filter(context) {
if (this.customId) {
const matches = typeof this.customId === 'string' ? this.customId === context.customId : context.customId.match(this.customId);
if (!matches)
return false;
}
if (this.filter)
return this.filter(context);
return true;
}
middlewares = [];
props;
}
exports.ModalCommand = ModalCommand;