From e4ac2624aecf177c689f941fb313210391e11d63 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Wed, 17 Jul 2024 20:32:45 +0500 Subject: [PATCH] oj --- events/Monitoring/messageDelete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/events/Monitoring/messageDelete.js b/events/Monitoring/messageDelete.js index a60d9568..b4285aa3 100644 --- a/events/Monitoring/messageDelete.js +++ b/events/Monitoring/messageDelete.js @@ -1,4 +1,5 @@ const BaseEvent = require("../../base/BaseEvent"); +const { AuditLogEvent } = require("discord.js"); class messageDelete extends BaseEvent { constructor() { @@ -24,7 +25,7 @@ class messageDelete extends BaseEvent { const logs = await message.guild.fetchAuditLogs({ limit: 5, - type: "MESSAGE_DELETE", + type: AuditLogEvent.MessageDelete, }); const deletedMessage = logs.entries.find(e => e.targetId === message.author.id && e.extra.channel.id && Date.now() - e.createdTimestamp < 20000);