discord_bot/util/getSubdirFiles.js
SileNce5k ac9b59281e
All checks were successful
CI / CI (push) Successful in 18s
Lint Codebase / eslint (push) Successful in 12s
Fix all eslint warnings
2024-11-05 06:32:40 +01:00

19 lines
No EOL
383 B
JavaScript

const fs = require('fs')
module.exports = function (path) {
let subdir = fs.readdirSync(path)
let commandFiles = [];
if(fs.statSync(path+subdir).isDirectory()){
goDeeper(path+subdir, commandFiles);
}else if(subdir.endsWith(".js")){
commandFiles.push(path+subdir)
}
//return commandFiles // ARRAY OF FILES ENDING WITH .js
}
function goDeeper(subdir, commandFiles){
}