standardise msg delete and edit log formats
This commit is contained in:
parent
0ec6e75959
commit
c317641dce
@ -96,14 +96,15 @@ class GuildLogger extends Observer {
|
|||||||
const hook = await message.guild.getWebhook('messageLog');
|
const hook = await message.guild.getWebhook('messageLog');
|
||||||
|
|
||||||
const embed = {
|
const embed = {
|
||||||
author: {
|
// author: {
|
||||||
name: `${message.author.tag} (${message.author.id})`,
|
// name: message.format('MSGLOG_DELETE_TITLE', { channel: message.channel.name, author: Util.escapeMarkdown(message.author.tag) }), //`${message.author.tag} (${message.author.id})`,
|
||||||
icon_url: message.author.displayAvatarURL({ size: 32 }) //eslint-disable-line camelcase
|
// icon_url: message.author.displayAvatarURL({ size: 32 }) //eslint-disable-line camelcase
|
||||||
},
|
// },
|
||||||
|
title: message.format('MSGLOG_DELETE_TITLE', { channel: message.channel.name, author: Util.escapeMarkdown(message.author.tag) }),
|
||||||
description: Util.escapeMarkdown(message.content)?.replace(/\\n/gu, ' ') || message.format('MSGLOG_NOCONTENT'),
|
description: Util.escapeMarkdown(message.content)?.replace(/\\n/gu, ' ') || message.format('MSGLOG_NOCONTENT'),
|
||||||
color: CONSTANTS.COLORS.RED,
|
color: CONSTANTS.COLORS.RED,
|
||||||
footer: {
|
footer: {
|
||||||
text: `Message deleted in #${message.channel.name} | Message ID: ${message.id}`
|
text: message.format('MSGLOG_DELETE_FOOTER', { msgID: message.id, userID: message.author.id })
|
||||||
},
|
},
|
||||||
timestamp: message.createdAt
|
timestamp: message.createdAt
|
||||||
};
|
};
|
||||||
@ -370,6 +371,10 @@ class GuildLogger extends Observer {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
const embed = {
|
const embed = {
|
||||||
|
// author: {
|
||||||
|
// name: oldMessage.format('MSGLOG_EDIT_TITLE', { author: Util.escapeMarkdown(author.tag), channel: channel.name }),
|
||||||
|
// icon_url: oldMessage.author.displayAvatarURL({ size: 32 }) // eslint-disable-line camelcase
|
||||||
|
// },
|
||||||
title: oldMessage.format('MSGLOG_EDIT_TITLE', { author: Util.escapeMarkdown(author.tag), channel: channel.name }),
|
title: oldMessage.format('MSGLOG_EDIT_TITLE', { author: Util.escapeMarkdown(author.tag), channel: channel.name }),
|
||||||
footer: {
|
footer: {
|
||||||
text: oldMessage.format('MSGLOG_EDIT_FOOTER', { msgID: oldMessage.id, userID: author.id })
|
text: oldMessage.format('MSGLOG_EDIT_FOOTER', { msgID: oldMessage.id, userID: author.id })
|
||||||
|
Loading…
Reference in New Issue
Block a user