ignore example commands on run
This commit is contained in:
parent
56b43d8e16
commit
324973cc13
@ -40,7 +40,7 @@ readdirAsync(mainPath)
|
||||
await Promise.all(
|
||||
categories.map(async (category) => {
|
||||
const catPath = join(mainPath, category);
|
||||
const files = (await readdirAsync(catPath)).filter((file) => file.endsWith('.js'));
|
||||
const files = (await readdirAsync(catPath)).filter((file) => file.endsWith('.js') && !file.endsWith('.example.js'));
|
||||
// For each command file
|
||||
return await Promise.all(
|
||||
files.map(async (current) => {
|
||||
|
2
index.js
2
index.js
@ -38,7 +38,7 @@ readdirAsync(cmdPath)
|
||||
categories.map(async (category) => {
|
||||
const catPath = join(cmdPath, category);
|
||||
const content = await readdirAsync(catPath);
|
||||
const files = content.filter((file) => file.endsWith('.js'));
|
||||
const files = content.filter((file) => file.endsWith('.js') && !file.endsWith('.example.js'));
|
||||
// For each command file
|
||||
return await Promise.all(
|
||||
files.map(async (current) => {
|
||||
|
Loading…
Reference in New Issue
Block a user