From 04369523279e8c8e2b2e02f3c12d23971584b327 Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 24 Oct 2022 18:24:53 +0100 Subject: [PATCH] fix(logging): ignore ephemeral message updates --- src/listeners/client/messageUpdate.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/listeners/client/messageUpdate.js b/src/listeners/client/messageUpdate.js index 4239cb6..ab99ebc 100644 --- a/src/listeners/client/messageUpdate.js +++ b/src/listeners/client/messageUpdate.js @@ -1,4 +1,5 @@ const { Listener } = require('@eartharoid/dbf'); +const { MessageFlagsBitField } = require('discord.js'); const { logMessageEvent } = require('../../lib/logging'); module.exports = class extends Listener { @@ -20,6 +21,8 @@ module.exports = class extends Listener { const client = this.client; if (newMessage.partial) newMessage.fetch().then(m => (newMessage = m)).catch(client.log.error); + if (newMessage.flags.has(MessageFlagsBitField.Flags.Ephemeral)) return; + const ticket = await client.prisma.ticket.findUnique({ include: { guild: true }, where: { id: newMessage.channel.id },