Make help command show permissions required

This commit is contained in:
loicbersier 2019-11-08 13:01:21 +01:00
parent 23d03cd095
commit ccdaff0816

View file

@ -54,6 +54,14 @@ class HelpCommand extends Command {
embed.addField('Aliases', `\`${command.aliases.join('` `')}\``, true); embed.addField('Aliases', `\`${command.aliases.join('` `')}\``, true);
} }
if (command.userPermissions) {
embed.addField('User permission', `\`${command.userPermissions.join('` `')}\``, true);
}
if (command.clientPermissions) {
embed.addField('Bot permission', `\`${command.clientPermissions.join('` `')}\``, true);
}
return message.util.send({ embed }); return message.util.send({ embed });
} }