From f448c6380109be09ad335677ca03d500fffde492 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 22 Jul 2021 09:20:03 +0200 Subject: [PATCH] Make util use subdirfiles command on reload --- util/reloadCommands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/reloadCommands.js b/util/reloadCommands.js index eee8593..025632e 100644 --- a/util/reloadCommands.js +++ b/util/reloadCommands.js @@ -5,7 +5,7 @@ const utilPath = 'util/' module.exports = function (client) { - let utilFiles = fs.readdirSync(utilPath).filter(file => file.endsWith('.js')); + let utilFiles = getSubdirFiles(utilPath) let commandFiles = getSubdirFiles(commandPath); @@ -14,7 +14,7 @@ module.exports = function (client) { delete require.cache[require.resolve(`../${i}`)]; } for (const i of utilFiles){ - delete require.cache[require.resolve(`../${utilPath}${i}`)] + delete require.cache[require.resolve(`../${i}`)] } } client.commands.clear()