Implemented count feature

This commit is contained in:
Space-Banane
2026-03-18 16:33:03 +01:00
parent fdcf3d06e0
commit 9aec36d0e8
8 changed files with 305 additions and 6 deletions
+14 -3
View File
@@ -55,10 +55,21 @@ export async function resolveCommands() {
const definition = module.default || Object.values(module).find((val: any) => val && val.name && val.action);
if (definition && definition.name && definition.action) {
currentParent
const command = currentParent
.command(definition.name)
.description(definition.description || '')
.action(definition.action);
.description(definition.description || '');
if (definition.options) {
definition.options.forEach((opt: any) => {
if (opt.required) {
command.requiredOption(opt.name, opt.description);
} else {
command.option(opt.name, opt.description);
}
});
}
command.action(definition.action);
}
}
}