UNPKG

grammy-class-composer

Version:

A simple composer to use Grammy js in a more Object oriented way

21 lines 743 B
"use strict"; /* eslint-disable @typescript-eslint/ban-types */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Command = void 0; const Registry_1 = require("./Registry"); function Command(query, description = "") { return function (target, propertyKey) { const classInstance = (0, Registry_1.createOrFindClassEntry)(target); if (classInstance == undefined) { throw "No class Instance found for method: " + propertyKey; } classInstance.entries.push({ propertyKey, query, type: Registry_1.MethodType.COMMAND, description, }); }; } exports.Command = Command; //# sourceMappingURL=Command.js.map