UNPKG

solara-testing-beta

Version:

A modern, customizable, and lightweight Discord framework.

38 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Command = void 0; class Command { name; description; aliases; category; code; type; slash; options; enabled; developerOnly; constructor(data) { this.name = data.name; this.description = data.description; this.aliases = data.aliases ?? []; this.category = data.category ?? 'Miscellaneous'; this.code = data.code; this.type = data.type ?? 'both'; this.slash = data.slash ?? true; this.options = data.options ?? []; this.enabled = data.enabled ?? true; this.developerOnly = data.developerOnly ?? false; if (this.type === 'interaction' || this.type === 'both') { if (!this.description) { throw new Error(`❌ Command "${this.name}" requires a description for slash commands.`); } this.slash = true; } if (this.type === 'message' && this.slash) { this.slash = false; } } } exports.Command = Command; //# sourceMappingURL=Command.js.map