This commit is contained in:
Jonny_Bro (Nikita) 2024-02-06 21:51:49 +05:00
parent 62966c9893
commit 5651744445
No known key found for this signature in database
GPG key ID: 391C19BE62D36B33

View file

@ -14,16 +14,17 @@ module.exports = (commands, prefix) => {
const commandsArr = [];
commands.filter(cmd => cmd.category === category).map(cmd => {
const obj = {
commandName: cmd.name,
commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`,
commandDescription: cmd.description,
commandAlias: cmd.aliases?.join(", ") || "None",
};
commandsArr.push(obj);
});
commands
.filter(cmd => cmd.category === category)
.map(cmd => {
const obj = {
commandName: cmd.name,
commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`,
commandDescription: cmd.description,
commandAlias: cmd.aliases?.join(", ") || "None",
};
commandsArr.push(obj);
});
const categoryObj = {
categoryId: category,