From 0a2e30a41f926cd6ba6d132069691fa828c29544 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Fri, 2 Dec 2022 23:24:35 -0700 Subject: [PATCH] foxwells.vinboard: fix null member if message not cached --- src/modules/foxwells.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/foxwells.js b/src/modules/foxwells.js index ca0e8b8..4e307ad 100644 --- a/src/modules/foxwells.js +++ b/src/modules/foxwells.js @@ -238,8 +238,9 @@ async function createBoardMessage(msg, count) { } return { - avatarURL: msg.member.avatarURL("png", 256), - username: msg.member.displayName, + avatarURL: + msg.member?.avatarURL("png", 256) ?? msg.author.avatarURL("png", 256), + username: msg.member?.displayName ?? msg.author.username, threadID: VINBOARD_THREAD_ID, threadName: "Vinboard", embeds: [embed],