extend command bypassing
if a command begins with an underscore ("_"), it won't be loaded.
This commit is contained in:
parent
d9a8ffc41c
commit
e0e8a57bef
1 changed files with 2 additions and 2 deletions
4
index.js
4
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();
|
||||
init();
|
||||
|
|
Loading…
Reference in a new issue