mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Hide owner only/hidden commands from help, Deps
This commit is contained in:
@@ -29,9 +29,12 @@ module.exports = class HelpCommand extends Command {
|
||||
.setColor(0x00AE86)
|
||||
.setFooter(`${this.client.registry.commands.size} Commands`);
|
||||
for (const group of this.client.registry.groups.values()) {
|
||||
const owner = this.client.isOwner(msg.author);
|
||||
const commands = group.commands.filter(cmd => !cmd.hidden && owner ? true : !cmd.ownerOnly);
|
||||
if (!commands.size) continue;
|
||||
embed.addField(
|
||||
`❯ ${group.name}`,
|
||||
group.commands.map(cmd => `\`${cmd.name}\``).join(', ') || 'None'
|
||||
commands.map(cmd => `\`${cmd.name}\``).join(', ')
|
||||
);
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user