From 12d28955b560b29a1aa669b7f12b6b441462342c Mon Sep 17 00:00:00 2001 From: khaazz Date: Sat, 9 Mar 2019 22:00:59 +0100 Subject: [PATCH] Fix discord embed triggering update event --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 577d0cf..536b21f 100644 --- a/index.js +++ b/index.js @@ -96,7 +96,11 @@ bot.on('messageCreate', msg => { bot.on('messageUpdate', (msg, oldMsg) => { // !oldMsg = message not cached = don't log the update - if (!msg.author || msg.author.bot || !msg.channel.guild || !oldMsg) { + if (!msg.author || msg.author.bot || !msg.channel.guild || !oldMsg) { // msg.author -> edge case bug + return; + } + + if (oldMsg.content === msg.content) { return; }