mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
userPermissions and clientPermissions in help
This commit is contained in:
+10
-1
@@ -1,6 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { util } = require('discord.js-commando');
|
||||
|
||||
module.exports = class HelpCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -40,7 +41,15 @@ module.exports = class HelpCommand extends Command {
|
||||
.addField('❯ Aliases',
|
||||
commands[0].aliases.join(', ') || 'None')
|
||||
.addField('❯ Group',
|
||||
commands[0].group.name);
|
||||
commands[0].group.name)
|
||||
.addField('❯ Client Permissions',
|
||||
commands[0].clientPermissions
|
||||
? commands[0].clientPermissions.map(perm => util.permissions[perm]).join(', ')
|
||||
: 'None')
|
||||
.addField('❯ User Permissions',
|
||||
commands[0].userPermissions
|
||||
? commands[0].userPermissions.map(perm => util.permissions[perm]).join(', ')
|
||||
: 'None');
|
||||
return msg.embed(embed);
|
||||
} else if (commands.length > 1) {
|
||||
return msg.say(`Multiple commands found: ${commands.map(c => c.name).join(', ')}`);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "36.1.0",
|
||||
"version": "36.1.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user