From 106afe52eda0d27a1f7565998744c630f7a9cc61 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 25 Jun 2021 18:43:21 +0200 Subject: [PATCH] Fix crash on help command if no commands match If there were no specific commands that matched the argument, the bot would crash. This commit fixes that issue. --- commands/help.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/help.js b/commands/help.js index ccb76ea..e7361ff 100644 --- a/commands/help.js +++ b/commands/help.js @@ -53,6 +53,9 @@ module.exports = { } } let regex = //g + if(commands === " "){ + noHelp = 1; + } commands = commands.replace(regex, prefix) embed.addFields( { name: "General", value: commands },