mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +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;
|
let cmdCount = 0;
|
||||||
for (const group of this.client.registry.groups.values()) {
|
for (const group of this.client.registry.groups.values()) {
|
||||||
const owner = this.client.isOwner(msg.author);
|
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;
|
if (!commands.size) continue;
|
||||||
cmdCount += commands.size;
|
cmdCount += commands.size;
|
||||||
embed.addField(
|
embed.addField(
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "112.2.5",
|
"version": "112.2.6",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user