diff --git a/commands/util/help.js b/commands/util/help.js index 5a608a53..f144738c 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -1,5 +1,6 @@ const Command = require('../../structures/Command'); const { MessageEmbed } = require('discord.js'); +const { util: { permissions } } = require('discord.js-commando'); const { stripIndents } = require('common-tags'); module.exports = class HelpCommand extends Command { @@ -56,6 +57,12 @@ module.exports = class HelpCommand extends Command { return msg.reply('Failed to send DM. You probably have DMs disabled.'); } } + const userPerms = command.userPermissions + ? command.userPermissions.map(perm => permissions[perm]).join(', ') + : 'None'; + const clientPerms = command.clientPermissions + ? command.clientPermissions.map(perm => permissions[perm]).join(', ') + : 'None'; return msg.say(stripIndents` __Command **${command.name}**__${command.guildOnly ? ' (Usable only in servers)' : ''} ${command.description}${command.details ? `\n${command.details}` : ''} @@ -64,6 +71,8 @@ module.exports = class HelpCommand extends Command { **Aliases:** ${command.aliases.join(', ') || 'None'} **Group:** ${command.group.name} (\`${command.groupID}:${command.memberName}\`) **NSFW:** ${command.nsfw ? 'Yes' : 'No'} + **Permissions You Need:** ${userPerms} + **Permissions I Need:** ${clientPerms} `); } }; diff --git a/package.json b/package.json index 4de38bb5..e7effdd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "114.5.5", + "version": "114.5.6", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {