From a1df043f86a1502a166fb9f2b27eb940ea9eda0a Mon Sep 17 00:00:00 2001 From: ION606 Date: Sun, 12 Jun 2022 16:47:06 +0300 Subject: [PATCH] Fixed the 'help' command --- commands/misc/help.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/commands/misc/help.js b/commands/misc/help.js index 2dc4dfb..fed2062 100644 --- a/commands/misc/help.js +++ b/commands/misc/help.js @@ -18,7 +18,7 @@ module.exports ={ let temp = "***Selmer Bot Commands:***\n"; - bot.commands.sort((a, b) => {a.name[0] < b.name[0]}); + bot.commands.sort((a, b) => {if (a.name && b.name) { return a.name[0] < b.name[0]} else {return false;} }); bot.commands.forEach((comm) => { if (comm.name != 'verify') { @@ -27,9 +27,13 @@ module.exports ={ } else if (comm.name == 'game') { temp += `game - use _!help game_\n`; - } + } /* else if (comm.name == 'setup') { + temp += `setup - use _!setup_\n`; + }*/ else { - temp += `${comm.name.toLowerCase()} - _${comm.description}_\n`; + if (comm.name && comm.description) { + temp += `${comm.name.toLowerCase()} - _${comm.description}_\n`; + } } } });