Hide owner only/hidden commands from help, Deps

This commit is contained in:
Dragon Fire
2020-02-22 12:03:15 -05:00
parent 189dbc338f
commit 26d057627b
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -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 {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "110.6.0",
"version": "110.6.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
@@ -43,17 +43,17 @@
"mathjs": "^6.6.0",
"moment": "^2.24.0",
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.27",
"moment-timezone": "^0.5.28",
"node-opus": "^0.3.3",
"node-superfetch": "^0.1.10",
"random-js": "^2.1.0",
"soap": "^0.30.0",
"soap": "^0.31.0",
"winston": "^3.2.1"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-amber": "^2.0.1",
"eslint-plugin-json": "^2.0.1"
"eslint-plugin-json": "^2.1.0"
},
"eslintConfig": {
"extends": "amber",