Skip to content

Commit

Permalink
If content hasnt changed dont fire messageUpdate event
Browse files Browse the repository at this point in the history
  • Loading branch information
StrawHatHacker committed Dec 19, 2021
1 parent 3bf693f commit 6b1946f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/events/messageUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = async (_client, oldMessage, newMessage) => {
// Return in case of uncached message
if (!oldMessage.content) return;

// Return if newly edited message is the same as before
if (oldMessage.content === newMessage.content) return;

const Guild = await GuildModel.findById(newMessage.guild.id);
if (!Guild) return;

Expand Down

0 comments on commit 6b1946f

Please sign in to comment.