fixed a thing

This commit is contained in:
Erik 2021-06-15 23:30:59 +03:00
parent 1d499560a1
commit fb06170380
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16
2 changed files with 6 additions and 1 deletions

View File

@ -429,10 +429,12 @@ class GuildLogger extends Observer {
if (reference && reference.channelID === channel.id) { if (reference && reference.channelID === channel.id) {
const referenced = await channel.messages.fetch(reference.messageID); const referenced = await channel.messages.fetch(reference.messageID);
// eslint-disable-next-line no-nested-ternary
const content = referenced.content ? referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content : oldMessage.format('MSGLOG_REPLY_NOCONTENT');
embed.fields.push({ embed.fields.push({
name: oldMessage.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }), name: oldMessage.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }),
value: oldMessage.format('MSGLOG_REPLY_VALUE', { value: oldMessage.format('MSGLOG_REPLY_VALUE', {
content: referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content, content,
link: referenced.url link: referenced.url
}) })
}); });

View File

@ -79,6 +79,9 @@ Message was in reply to user {tag} ({id}):
**[Jump to message]({link})** **[Jump to message]({link})**
{content} {content}
[MSGLOG_REPLY_NOCONTENT]
**__Missing content.__**
[MSGLOG_FILTERED] [MSGLOG_FILTERED]
The message was filtered: The message was filtered: