mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02:00
fix(logging): ignore ephemeral message updates
This commit is contained in:
parent
ecd23a150a
commit
0436952327
@ -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 },
|
||||
|
Loading…
Reference in New Issue
Block a user