dressed
Version:
A sleek, serverless-ready Discord bot framework.
25 lines • 1.04 kB
JavaScript
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
if (typeof path === "string" && /^\.\.?\//.test(path)) {
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
});
}
return path;
};
import { createHandlerParser } from "./index.js";
export const parseCommands = createHandlerParser({
col1Name: "Command",
messages: {
pending: "Generating commands",
generated: "Generated commands",
noItems: "No commands found",
},
itemMessages: ({ name }) => ({
confict: `"${name}" conflicts with another command, skipping the duplicate`,
}),
async createData({ path }) {
const { config } = await import(__rewriteRelativeImportExtension(path));
return { config };
},
});
//# sourceMappingURL=commands.js.map