If no moreHelp is available, use the normal help

Basically just use the normal help string instead of just sending error
if there is no moreHelp on that command.
This commit is contained in:
SileNce5k 2022-01-18 10:16:12 +01:00
parent 12af74901f
commit bcff645ba7

View file

@ -50,22 +50,28 @@ module.exports = {
commands = commands + `${element}\n`
});
} else {
commands = command.description;
noHelp = 1;
}
break;
}
}
let regex = /<prefix>/g
if(commands === ""){
noHelp = 1;
}
commands = commands.replace(regex, prefix)
embed.addFields(
{ name: "General", value: commands },
)
if(noHelp == 0)
if(commands === false){
message.channel.send("There is no command with that name");
}
else if(noHelp == 0){
message.channel.send({embeds :[embed]});
else
message.channel.send("Either there is no command with that name, or there is no specific help for it.")
}
else {
embed.addFields(
{name: "Help", value: commands}
)
}
},
};