This commit is contained in:
JonnyBro 2021-12-18 19:17:31 +05:00
parent 563c668562
commit 99d1451d82

View file

@ -24,7 +24,7 @@ module.exports = {
[ "Название", "Описание", "Использование", "Откат" ] [ "Название", "Описание", "Использование", "Откат" ]
]; ];
const cmds = commands.filter((cmd) => cmd.help.category === cat).array(); const cmds = commands.filter((cmd) => cmd.help.category === cat).array();
text += `### ${cat} (${cmds.length} ${getNoun(cmds.length, "команда", "команды", "команд")}команд(а/ы))\n\n`; text += `### ${cat} (${cmds.length} ${getNoun(cmds.length, "команда", "команды", "команд")}\n\n`;
cmds.sort(function(a, b) { cmds.sort(function(a, b) {
if (a.help.name < b.help.name) return -1; if (a.help.name < b.help.name) return -1;
else return 1; else return 1;
@ -33,7 +33,7 @@ module.exports = {
`**${cmd.help.name}** ${cmd.help.aliases.length ? `**(${cmd.help.aliases.join(", ")})**` : ""}`, `**${cmd.help.name}** ${cmd.help.aliases.length ? `**(${cmd.help.aliases.join(", ")})**` : ""}`,
client.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`), client.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`),
client.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`), client.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`),
`${Math.ceil(cmd.conf.cooldown / 1000)} ${getNoun(cmds.length, "секунда", "секунды", "секунд")}` `${Math.ceil(cmd.conf.cooldown / 1000)} ${getNoun(Math.ceil(cmd.conf.cooldown / 1000), "секунда", "секунды", "секунд")}`
]); ]);
}); });
text += `${table(arrCat)}\n\n`; text += `${table(arrCat)}\n\n`;