mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
revert that
This commit is contained in:
parent
e4ac2624ae
commit
66c4af9ac5
4 changed files with 4 additions and 13 deletions
|
@ -21,22 +21,13 @@ class messageDelete extends BaseEvent {
|
|||
const guildData = message.data.guild;
|
||||
|
||||
if (guildData.plugins?.monitoring?.messageDelete) {
|
||||
await client.wait(1000);
|
||||
|
||||
const logs = await message.guild.fetchAuditLogs({
|
||||
limit: 5,
|
||||
type: AuditLogEvent.MessageDelete,
|
||||
});
|
||||
|
||||
const deletedMessage = logs.entries.find(e => e.targetId === message.author.id && e.extra.channel.id && Date.now() - e.createdTimestamp < 20000);
|
||||
|
||||
const embed = client.embed({
|
||||
author: {
|
||||
name: message.author.getUsername(),
|
||||
iconURL: message.author.displayAvatarURL(),
|
||||
},
|
||||
title: message.translate("misc:MONITORING:DELETE:TITLE", { user: message.author.getUsername() }),
|
||||
description: message.translate("misc:MONITORING:DELETE:DESCRIPTION", { deletedBy: deletedMessage.executor ? deletedMessage.executor.toString() : "Unknown", content: message.content, channel: message.channel.toString(), time: `<t:${Math.floor(message.createdTimestamp / 1000)}:f>` }),
|
||||
description: message.translate("misc:MONITORING:DELETE:DESCRIPTION", { content: message.content, channel: message.channel.toString(), time: `<t:${Math.floor(message.createdTimestamp / 1000)}:f>` }),
|
||||
});
|
||||
|
||||
message.guild.channels.cache.get(guildData.plugins.monitoring.messageDelete).send({
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"MONITORING": {
|
||||
"DELETE": {
|
||||
"TITLE": "{{user}} deleted a message!",
|
||||
"DESCRIPTION": "Deleted by: {{deletedBy}}\nMessage content was: ```{{content}}```\nChannel: {{channel}}\nTime created: {{time}}"
|
||||
"DESCRIPTION": "Message content was: ```{{content}}```\nChannel: {{channel}}\nTime created: {{time}}"
|
||||
},
|
||||
"UPDATE": {
|
||||
"TITLE": "{{user}} updated a message!",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"MONITORING": {
|
||||
"DELETE": {
|
||||
"TITLE": "{{user}} удалил сообщение!",
|
||||
"DESCRIPTION": "Удалил: {{deletedBy}}\nСодержимое сообщения было: ```{{content}}```\nКанал: {{channel}}\nВремя создания: {{time}}"
|
||||
"DESCRIPTION": "Содержимое сообщения было: ```{{content}}```\nКанал: {{channel}}\nВремя создания: {{time}}"
|
||||
},
|
||||
"UPDATE": {
|
||||
"TITLE": "{{user}} обновил сообщение!",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"MONITORING": {
|
||||
"DELETE": {
|
||||
"TITLE": "{{user}} видалив повідомлення!",
|
||||
"DESCRIPTION": "Видалив: {{deletedBy}}\nВміст повідомлення було: ```{{content}}```\nКанал: {{channel}}\nЧас створення: {{time}}"
|
||||
"DESCRIPTION": "Вміст повідомлення було: ```{{content}}```\nКанал: {{channel}}\nЧас створення: {{time}}"
|
||||
},
|
||||
"UPDATE": {
|
||||
"TITLE": "{{user}} оновив повідомлення!",
|
||||
|
|
Loading…
Reference in a new issue