Get files from top directory + rename file
* Generalise variable names * Change require stuff to the new thing
This commit is contained in:
parent
32dbcd062e
commit
047ba95311
4 changed files with 26 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue