UNPKG

seyfert

Version:

The most advanced framework for discord bots

44 lines (43 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContextMenuCommand = void 0; const common_1 = require("../../common"); class ContextMenuCommand { middlewares = []; __filePath; __t; guildId; name; type; nsfw; integrationTypes = []; contexts = []; description; defaultMemberPermissions; botPermissions; dm; name_localizations; description_localizations; props = {}; toJSON() { return { name: this.name, type: this.type, nsfw: this.nsfw, description: this.description, name_localizations: this.name_localizations, description_localizations: this.description_localizations, guild_id: this.guildId, dm_permission: this.dm, default_member_permissions: this.defaultMemberPermissions ? this.defaultMemberPermissions.toString() : undefined, contexts: this.contexts, integration_types: this.integrationTypes, }; } async reload() { delete require.cache[this.__filePath]; const __tempCommand = await (0, common_1.magicImport)(this.__filePath).then(x => x.default ?? x); Object.setPrototypeOf(this, __tempCommand.prototype); } } exports.ContextMenuCommand = ContextMenuCommand;