From 09043d7e8d609ac3e15c7fc5074caef34e7d50a0 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 6 May 2022 21:31:09 +0300 Subject: [PATCH] bugfix to message 404 --- src/structure/components/observers/GuildLogging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structure/components/observers/GuildLogging.js b/src/structure/components/observers/GuildLogging.js index 4f7a2e8..5631f0f 100644 --- a/src/structure/components/observers/GuildLogging.js +++ b/src/structure/components/observers/GuildLogging.js @@ -191,8 +191,8 @@ class GuildLogger extends Observer { }; if (reference && reference.channelId === channel.id) { - const referenced = await channel.messages.fetch(reference.messageId); - embed.fields.push({ + const referenced = await channel.messages.fetch(reference.messageId).catch(() => null); + if(referenced) embed.fields.push({ name: wrapper.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }), value: wrapper.format('MSGLOG_REPLY_VALUE', { content: referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content,