extend command bypassing

if a command begins with an underscore ("_"), it won't be loaded.
This commit is contained in:
carol 2020-01-06 10:14:33 -08:00 committed by GitHub
parent d9a8ffc41c
commit e0e8a57bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ const init = async () => {
await crawl("commands",cmdFiles); await crawl("commands",cmdFiles);
client.logger.log(`Loading a total of ${cmdFiles.length} commands.`); client.logger.log(`Loading a total of ${cmdFiles.length} commands.`);
cmdFiles.forEach(f => { cmdFiles.forEach(f => {
if (!f.endsWith(".js")) return; if (!f.endsWith(".js") || !f.startsWith("_")) return;
const response = client.loadCommand(f); const response = client.loadCommand(f);
if (response) console.log(response); if (response) console.log(response);
}); });