bdjs
Version:
A potent package for creating Discord bots.
13 lines (12 loc) • 562 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Function_1 = require("../structures/Function");
const discord_js_1 = require("discord.js");
exports.default = new Function_1.BaseFunction({
description: 'Check whether current interaction belongs to a modal or not.',
code: async function (d) {
if (d.commandType !== 'anyInteraction')
throw new d.error(d, 'disallowed', d.function?.name, '"anyInteraction" commands');
return d.ctx?.raw instanceof discord_js_1.ModalSubmitInteraction;
}
});