aboutsummaryrefslogtreecommitdiff
path: root/events/messageUpdate.js
diff options
context:
space:
mode:
authorAlee's Pi <alee14498@gmail.com>2018-05-04 20:48:26 -0400
committerAlee's Pi <alee14498@gmail.com>2018-05-04 20:48:26 -0400
commit6e83ca97c115682d7afb2438a4dfd9c26c54bcde (patch)
treea2a0d156db12f1604b654305dd9f58d6d4c4bbb3 /events/messageUpdate.js
parent27c2a2778aae136ac235580c2b730e090224b23e (diff)
parent7725599e09f3cbeae71024c756718f8be8ab1e9b (diff)
downloadPokeBot-6e83ca97c115682d7afb2438a4dfd9c26c54bcde.tar.gz
PokeBot-6e83ca97c115682d7afb2438a4dfd9c26c54bcde.tar.bz2
PokeBot-6e83ca97c115682d7afb2438a4dfd9c26c54bcde.zip
gMerge branch 'master' of https://github.com/UniverseDevGroup/PokeBot
Nothin
Diffstat (limited to 'events/messageUpdate.js')
-rw-r--r--events/messageUpdate.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/events/messageUpdate.js b/events/messageUpdate.js
index 0baa08c..43a6a67 100644
--- a/events/messageUpdate.js
+++ b/events/messageUpdate.js
@@ -20,7 +20,10 @@ module.exports = async (bot, oldMsg, newMsg) => {
.setTimestamp()
.setFooter(`Edited message originally created by: ${oldMsg.author.tag}`, oldMsg.author.avatarURL);
const logChannel = await bot.plugins.settings.getStr('logs', oldMsg.guild.id);
- newMsg.guild.channels.find('id', logChannel).send({ embed });
+ if (!logChannel) return;
+ const channelObj = bot.channels.find('id', logChannel);
+ if (!channelObj) return;
+ channelObj.send({ embed });
}
catch (err) {
console.error(err.stack);