ignore example commands on run

This commit is contained in:
Baipyrus 2024-01-26 14:19:57 +01:00
parent 56b43d8e16
commit 324973cc13
2 changed files with 2 additions and 2 deletions

View File

@ -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) => {

View File

@ -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) => {