update
This commit is contained in:
parent
62966c9893
commit
5651744445
1 changed files with 12 additions and 11 deletions
|
@ -14,16 +14,17 @@ module.exports = (commands, prefix) => {
|
||||||
|
|
||||||
const commandsArr = [];
|
const commandsArr = [];
|
||||||
|
|
||||||
commands.filter(cmd => cmd.category === category).map(cmd => {
|
commands
|
||||||
const obj = {
|
.filter(cmd => cmd.category === category)
|
||||||
commandName: cmd.name,
|
.map(cmd => {
|
||||||
commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`,
|
const obj = {
|
||||||
commandDescription: cmd.description,
|
commandName: cmd.name,
|
||||||
commandAlias: cmd.aliases?.join(", ") || "None",
|
commandUsage: `${cmd.usage ? cmd.usage : `${prefix}${cmd.name}`}`,
|
||||||
};
|
commandDescription: cmd.description,
|
||||||
commandsArr.push(obj);
|
commandAlias: cmd.aliases?.join(", ") || "None",
|
||||||
});
|
};
|
||||||
|
commandsArr.push(obj);
|
||||||
|
});
|
||||||
|
|
||||||
const categoryObj = {
|
const categoryObj = {
|
||||||
categoryId: category,
|
categoryId: category,
|
||||||
|
@ -40,4 +41,4 @@ module.exports = (commands, prefix) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return finalCategories;
|
return finalCategories;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue