From ed047e22c052aee0bb2837dbd1f0e60ea2e4831d Mon Sep 17 00:00:00 2001 From: Mathew Date: Tue, 9 Apr 2019 12:47:38 +0200 Subject: [PATCH] removed n\a commands from help --- commands.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands.js b/commands.js index f2cf07a..da0a5bc 100644 --- a/commands.js +++ b/commands.js @@ -22,6 +22,9 @@ module.exports = { (function(commands, response){ var out = [] for(let com in commands){ + if (commands[com].permissions[response.socket.udata.group] !== 1){ + continue + } out.push([`${com} ${(function(args){ let out = "" for(let arg of args){ @@ -36,9 +39,7 @@ module.exports = { out += arg+" " } return out - })(commands[com].args)}`, commands[com].desc, `[permission: ${ - commands[com].permissions[response.socket.udata.group] == 1 ? "Yes" : "No" - }]`]) + })(commands[com].args)}`, commands[com].desc]) } return out })(db.commands, response)