From e0e8a57bef2dea6d58bf94e8645d04492e29b320 Mon Sep 17 00:00:00 2001 From: carol <34490428+rhearmas@users.noreply.github.com> Date: Mon, 6 Jan 2020 10:14:33 -0800 Subject: [PATCH] extend command bypassing if a command begins with an underscore ("_"), it won't be loaded. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index be62cf5..9992a88 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ const init = async () => { await crawl("commands",cmdFiles); client.logger.log(`Loading a total of ${cmdFiles.length} commands.`); cmdFiles.forEach(f => { - if (!f.endsWith(".js")) return; + if (!f.endsWith(".js") || !f.startsWith("_")) return; const response = client.loadCommand(f); if (response) console.log(response); }); @@ -61,4 +61,4 @@ const init = async () => { client.login(client.config.token); }; -init(); \ No newline at end of file +init();