From 0f2f8b03185a5d8c0823fcf76d30f97ed94364d4 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Tue, 31 Mar 2020 22:43:58 +1100 Subject: [PATCH] Merge branch 'next' of https://www.github.com/mudkipscience/woomy into next --- index.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 6f07db9..53aa208 100644 --- a/index.js +++ b/index.js @@ -61,11 +61,14 @@ client.aliases = new Discord.Collection() // Initialization function const init = async () => { - // Load modules - // Load events fs.readdir('./events', (err, files) => { - if (err) {} + if (err) { + client.logger.error('Failed to get files in events directory! ' + err); + + return; + }; + client.logger.info(`Loading ${files.length} events.`) files.forEach(file => { if (!file.endsWith('.js')) { @@ -78,7 +81,12 @@ const init = async () => { // Load commands fs.readdir('./commands', (err, files) => { - if (err) {} + if (err) { + client.logger.error('Failed to get files in commands directory! ' + err); + + return; + }; + client.logger.info(`Loading ${files.length} commands.`) files.forEach(file => { if (!file.endsWith('.js')) {