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