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:
parent
7891e079c1
commit
106afe52ed
1 changed files with 3 additions and 0 deletions
|
@ -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 },
|
||||
|
|
Loading…
Add table
Reference in a new issue