nhandler
Version:
The easy to use, all-in-one command, event and component handler.
13 lines (12 loc) • 625 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.createLegacyCommands = void 0;
const LegacyCommandHandler_1 = require("../classes/LegacyCommandHandler");
const createLegacyCommands = ({ client, prefixes = [], debug = undefined, }) => {
if (!client || !prefixes || !prefixes.length)
throw new Error("createLegacyCommands(): Client and prefix is required.");
const handler = new LegacyCommandHandler_1.LegacyCommandHandler(prefixes, debug ? console.log : undefined);
handler.setClient(client);
return handler;
};
exports.createLegacyCommands = createLegacyCommands;
;