UNPKG

nestwhats

Version:

A whatsapp-web.js wrapper for NestJS to create WhatsApp bots

33 lines (32 loc) 825 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandDiscovery = void 0; const context_1 = require("../context"); class CommandDiscovery extends context_1.NestWhatsBaseDiscovery { getName() { return this.meta.name; } getDescription() { return this.meta.description; } getAliases() { var _a; return (_a = this.meta.aliases) !== null && _a !== void 0 ? _a : []; } getPrefix() { return this.meta.prefix; } getClients() { const { client } = this.meta; if (!client) return undefined; return Array.isArray(client) ? client : [client]; } isCommand() { return true; } toJSON() { return this.meta; } } exports.CommandDiscovery = CommandDiscovery;