forked from Galactic/galactic-bot
bugfix to message 404
This commit is contained in:
parent
a7261c94fe
commit
09043d7e8d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user