From 2df5337e2d3105d38b1be6fac27eabb5d68490e0 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Thu, 26 Mar 2020 18:47:48 +1100 Subject: [PATCH] final fix (hopefully) --- src/events/ready.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/events/ready.js b/src/events/ready.js index be5792e..9818463 100644 --- a/src/events/ready.js +++ b/src/events/ready.js @@ -18,7 +18,7 @@ module.exports = client => { if(client.config.consoleLogs.length > 0) { try { - channel1 = client.guilds.cache.get(client.config.consoleLogs) + channel1 = guild.channels.cache.get(client.config.consoleLogs) } catch(err) { client.logger.error("Could not find consoleLogs channel (is the ID valid?):\n" + err); process.exit(1); @@ -35,15 +35,13 @@ module.exports = client => { }; }; - - - if(client.devmode == true) { + if(client.devmode !== true) { client.logger.warn("Running in development mode.") prefix = client.config.defaultSettings.devprefix; } else { prefix = client.config.defaultSettings.prefix; - if(channel1) { - channel1.send(`Bot started at \`${timestamp}\``); + if(channel) { + channel.send(`Bot started at \`${timestamp}\``); }; };