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.
This commit is contained in:
SileNce5k 2021-06-25 18:43:21 +02:00
parent 7891e079c1
commit 106afe52ed
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -53,6 +53,9 @@ module.exports = {
}
}
let regex = /<prefix>/g
if(commands === " "){
noHelp = 1;
}
commands = commands.replace(regex, prefix)
embed.addFields(
{ name: "General", value: commands },