From ed78c0ab31c321d1cf8aa8ad2fb879b5ecb1eb3f Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Fri, 21 Jun 2019 13:43:31 +0700 Subject: [PATCH] Tidak tampilkan perintah yg belum diimplementasi --- lib/command-handler/help.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/command-handler/help.js b/lib/command-handler/help.js index 7fc1231..cf86719 100644 --- a/lib/command-handler/help.js +++ b/lib/command-handler/help.js @@ -2,8 +2,8 @@ const commands = require('../command-group'); const cmds = []; -for (let [key] of Object.entries(commands)) { - cmds.push(key.toUpperCase()); +for (let [key, value] of Object.entries(commands)) { + if (value.indexOf('_') !== 0) cmds.push(key.toUpperCase()); } cmds.sort(); const msg = 'Perintah tersedia: ' + cmds.join(', ') + '.' -- 1.9.0