mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
Properly hide hidden commands from help
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class HelpCommand extends Command {
|
||||
let cmdCount = 0;
|
||||
for (const group of this.client.registry.groups.values()) {
|
||||
const owner = this.client.isOwner(msg.author);
|
||||
const commands = group.commands.filter(cmd => owner ? true : !cmd.ownerOnly && !cmd.hidden);
|
||||
const commands = group.commands.filter(cmd => (owner ? true : !cmd.ownerOnly) && !cmd.hidden);
|
||||
if (!commands.size) continue;
|
||||
cmdCount += commands.size;
|
||||
embed.addField(
|
||||
|
||||
Reference in New Issue
Block a user