From fb061703801fc6d87950ae5b21d22a9b4301fdf5 Mon Sep 17 00:00:00 2001 From: Navy Date: Tue, 15 Jun 2021 23:30:59 +0300 Subject: [PATCH] fixed a thing --- structure/client/components/observers/GuildLogging.js | 4 +++- structure/language/languages/en_us/en_us_observers.lang | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/structure/client/components/observers/GuildLogging.js b/structure/client/components/observers/GuildLogging.js index 7a285df..8397ab6 100644 --- a/structure/client/components/observers/GuildLogging.js +++ b/structure/client/components/observers/GuildLogging.js @@ -429,10 +429,12 @@ class GuildLogger extends Observer { if (reference && reference.channelID === channel.id) { 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({ name: oldMessage.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }), value: oldMessage.format('MSGLOG_REPLY_VALUE', { - content: referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content, + content, link: referenced.url }) }); diff --git a/structure/language/languages/en_us/en_us_observers.lang b/structure/language/languages/en_us/en_us_observers.lang index c18f02c..b01743a 100644 --- a/structure/language/languages/en_us/en_us_observers.lang +++ b/structure/language/languages/en_us/en_us_observers.lang @@ -79,6 +79,9 @@ Message was in reply to user {tag} ({id}): **[Jump to message]({link})** {content} +[MSGLOG_REPLY_NOCONTENT] +**__Missing content.__** + [MSGLOG_FILTERED] The message was filtered: