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) {
|
if (reference && reference.channelId === channel.id) {
|
||||||
const referenced = await channel.messages.fetch(reference.messageId);
|
const referenced = await channel.messages.fetch(reference.messageId).catch(() => null);
|
||||||
embed.fields.push({
|
if(referenced) embed.fields.push({
|
||||||
name: wrapper.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }),
|
name: wrapper.format('MSGLOG_REPLY', { tag: referenced.author.tag, id: referenced.author.id }),
|
||||||
value: wrapper.format('MSGLOG_REPLY_VALUE', {
|
value: wrapper.format('MSGLOG_REPLY_VALUE', {
|
||||||
content: referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content,
|
content: referenced.content.length > 900 ? referenced.content.substring(0, 900) + '...' : referenced.content,
|
||||||
|
Loading…
Reference in New Issue
Block a user