Get files from top directory + rename file

* Generalise variable names

* Change require stuff to the new thing
This commit is contained in:
SileNce5k 2021-07-22 09:14:06 +02:00
parent 32dbcd062e
commit 047ba95311
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
4 changed files with 26 additions and 20 deletions

View file

@ -1,12 +1,12 @@
const fs = require('fs');
const getCommandFiles = require('./getCommandFiles');
const getSubdirFiles = require('./getSubdirFiles');
const commandPath = 'commands/'
const utilPath = 'util/'
module.exports = function (client) {
let utilFiles = fs.readdirSync(utilPath).filter(file => file.endsWith('.js'));
let commandFiles = getCommandFiles(commandPath);
let commandFiles = getSubdirFiles(commandPath);
if (client.commands.size != 0) {