Show commands flag

This commit is contained in:
loicbersier 2020-04-11 17:23:20 +02:00
parent f7e562fb37
commit f534cb23b0

View file

@ -62,6 +62,10 @@ class HelpCommand extends Command {
embed.addField('Bot permission', `\`${command.clientPermissions.join('` `')}\``, true); embed.addField('Bot permission', `\`${command.clientPermissions.join('` `')}\``, true);
} }
if (command.contentParser.flagWords.length) {
embed.addField('Command flags', `\`${command.contentParser.flagWords.join('` `')}\``, true);
}
if (fs.existsSync(`./asset/img/command/${command.category.id}/${command.id}.png`)) { if (fs.existsSync(`./asset/img/command/${command.category.id}/${command.id}.png`)) {
embed.attachFiles(`./asset/img/command/${command.category.id}/${command.id}.png`); embed.attachFiles(`./asset/img/command/${command.category.id}/${command.id}.png`);
embed.setImage(`attachment://${command.id}.png`); embed.setImage(`attachment://${command.id}.png`);