From 6e0b29df62902aa047015a00898915149e8ceda2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 4 May 2018 21:13:59 -0400 Subject: [PATCH] mores stuff --- bot.js | 2 +- commands/Utility/nick.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index 2f46f23..4c87850 100644 --- a/bot.js +++ b/bot.js @@ -17,7 +17,7 @@ bot.aliases = new Discord.Collection(); bot.categories = new Discord.Collection(); bot.queue = new Discord.Collection(); bot.plugins = { - economy : require('./plugins/Economy.js'), + economy : require('./plugins/economy.js'), settings : require('./plugins/settings.js'), whitelist: require('./plugins/whitelist.js'), gyms : require('./plugins/gyms.js')}; diff --git a/commands/Utility/nick.js b/commands/Utility/nick.js index 961693c..bec9578 100644 --- a/commands/Utility/nick.js +++ b/commands/Utility/nick.js @@ -13,8 +13,10 @@ exports.run = async (bot, msg, args) => { msg.member.setNickname(args.join(' '), 'Requested by bot'); msg.channel.send('Changed nickname to: ' + args.join(' ')); const logChannel = await bot.plugins.settings.getStr('logs', msg.member.guild.id); - - bot.channels.find('id', logChannel).send( + if (!logChannel) return; + const channelObj = bot.channels.find('id', logChannel); + if (!channelObj) return; + channelObj.send( new RichEmbed() .setColor(0x00ae86) .setTitle(`Nickname: ${msg.author.tag}`)