Fixed help command

This commit is contained in:
Christer Warén 2021-08-21 19:12:52 +03:00
parent 17161b72b9
commit 6afe6c30f9

View File

@ -27,8 +27,9 @@ module.exports = {
msg.channel.send({ embeds: [embed] }); msg.channel.send({ embeds: [embed] });
} else { } else {
const categories = []; const categories = [];
let commandsToArray = Array.from(client.commands.values());
for (let i = 0; i < client.commands.size; i++) { for (let i = 0; i < client.commands.size; i++) {
if (!categories.includes(client.commands.array()[i].category)) categories.push(client.commands.array()[i].category); if (!categories.includes(commandsToArray[i].category)) categories.push(commandsToArray[i].category);
} }
let commands = ''; let commands = '';
for (let i = 0; i < categories.length; i++) { for (let i = 0; i < categories.length; i++) {