added needed permissions to command help

This commit is contained in:
ry 2020-01-03 17:32:27 +01:00
parent 34c1822e97
commit 72bd216f54
1 changed files with 29 additions and 23 deletions

View File

@ -1,5 +1,7 @@
const Command = require('../../src/structures/Command'); const Command = require('../../src/structures/Command');
const { MessageEmbed } = require('discord.js'); const {
MessageEmbed
} = require('discord.js');
module.exports = class Help extends Command { module.exports = class Help extends Command {
constructor() { constructor() {
@ -15,7 +17,7 @@ module.exports = class Help extends Command {
} }
async command(ctx) { async command(ctx) {
console.log(ctx.args); //console.log(ctx.args);
let silent = ['--nd', '--no-dev']; let silent = ['--nd', '--no-dev'];
if (ctx.args.includes(silent)) { if (ctx.args.includes(silent)) {
console.log('is silent'); console.log('is silent');
@ -87,8 +89,7 @@ module.exports = class Help extends Command {
); );
if (!command) return ctx.send(`That command couldn't be found. Use \`'help\` to see all commands.`); if (!command) return ctx.send(`That command couldn't be found. Use \`'help\` to see all commands.`);
let fields = [ let fields = [{
{
name: 'Module', name: 'Module',
value: command.module, value: command.module,
inline: true inline: true
@ -108,6 +109,11 @@ module.exports = class Help extends Command {
value: command.guildOnly ? 'Yes' : 'No', value: command.guildOnly ? 'Yes' : 'No',
inline: true inline: true
}, },
{
name: 'Permissions needed',
value: command.AuthorPermissions ? command.AuthorPermissions : 'None',
inline: true
},
{ {
name: 'Developers only?', name: 'Developers only?',
value: command.developerOnly ? 'Yes' : 'No', value: command.developerOnly ? 'Yes' : 'No',