Skip to content

Commit

Permalink
fix(logging): ignore ephemeral message updates
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Oct 24, 2022
1 parent ecd23a1 commit 0436952
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/listeners/client/messageUpdate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { Listener } = require('@eartharoid/dbf');
const { MessageFlagsBitField } = require('discord.js');
const { logMessageEvent } = require('../../lib/logging');

module.exports = class extends Listener {
Expand All @@ -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 },
Expand Down

0 comments on commit 0436952

Please sign in to comment.