mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
oj
This commit is contained in:
parent
b2070ba6cb
commit
e4ac2624ae
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
const BaseEvent = require("../../base/BaseEvent");
|
const BaseEvent = require("../../base/BaseEvent");
|
||||||
|
const { AuditLogEvent } = require("discord.js");
|
||||||
|
|
||||||
class messageDelete extends BaseEvent {
|
class messageDelete extends BaseEvent {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -24,7 +25,7 @@ class messageDelete extends BaseEvent {
|
||||||
|
|
||||||
const logs = await message.guild.fetchAuditLogs({
|
const logs = await message.guild.fetchAuditLogs({
|
||||||
limit: 5,
|
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);
|
const deletedMessage = logs.entries.find(e => e.targetId === message.author.id && e.extra.channel.id && Date.now() - e.createdTimestamp < 20000);
|
||||||
|
|
Loading…
Reference in a new issue