diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-05-04 21:13:59 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-05-04 21:13:59 -0400 |
| commit | 6e0b29df62902aa047015a00898915149e8ceda2 (patch) | |
| tree | a645f6f0acaa5731d85e838f4cb5476d7bfa98a9 /commands | |
| parent | 7725599e09f3cbeae71024c756718f8be8ab1e9b (diff) | |
| download | PokeBot-6e0b29df62902aa047015a00898915149e8ceda2.tar.gz PokeBot-6e0b29df62902aa047015a00898915149e8ceda2.tar.bz2 PokeBot-6e0b29df62902aa047015a00898915149e8ceda2.zip | |
mores stuff
Diffstat (limited to 'commands')
| -rw-r--r-- | commands/Utility/nick.js | 6 |
1 files changed, 4 insertions, 2 deletions
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}`) |
