mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Help all
This commit is contained in:
@@ -27,7 +27,7 @@ module.exports = class HelpCommand extends Command {
|
|||||||
async run(msg, args) {
|
async run(msg, args) {
|
||||||
const { command } = args;
|
const { command } = args;
|
||||||
const commands = this.client.registry.findCommands(command, false, msg);
|
const commands = this.client.registry.findCommands(command, false, msg);
|
||||||
if (command) {
|
if (command && command !== 'all') {
|
||||||
if (commands.length === 1) {
|
if (commands.length === 1) {
|
||||||
msg.say(stripIndents`
|
msg.say(stripIndents`
|
||||||
__Command **${commands[0].name}**:__ *${commands[0].description}*
|
__Command **${commands[0].name}**:__ *${commands[0].description}*
|
||||||
@@ -53,7 +53,7 @@ module.exports = class HelpCommand extends Command {
|
|||||||
.setColor(0x00AE86);
|
.setColor(0x00AE86);
|
||||||
for (const group of this.client.registry.groups.array()) {
|
for (const group of this.client.registry.groups.array()) {
|
||||||
embed.addField(group.name,
|
embed.addField(group.name,
|
||||||
group.commands.filter(c => c.isUsable(msg)).map(c => `\`${c.name}\``).join(', ') || 'None Available');
|
command !== 'all' ? group.commands.filter(c => c.isUsable(msg)).map(c => `\`${c.name}\``).join(', ') || 'None Available' : group.commands);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await msg.author.send({embed});
|
await msg.author.send({embed});
|
||||||
|
|||||||
Reference in New Issue
Block a user