UNPKG

solara-testing-beta

Version:

A modern, customizable, and lightweight Discord framework.

24 lines 760 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FunctionManager = void 0; const discord_js_1 = require("discord.js"); class FunctionManager { client; functions; constructor(client) { this.client = client; this.functions = new discord_js_1.Collection(); } addFunction(func) { const name = `$${func.name.toLowerCase()}`; if (this.functions.has(name)) { console.warn(`⚠️ Function "${name}" is already registered. Overwriting.`); } this.functions.set(name, func); } getFunction(name) { return this.functions.get(name.toLowerCase()); } } exports.FunctionManager = FunctionManager; //# sourceMappingURL=FunctionManager.js.map