foxwells.vinboard: fix null member if message not cached

This commit is contained in:
Cynthia Foxwell 2022-12-02 23:24:35 -07:00
parent 58fe216636
commit 0a2e30a41f

View file

@ -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],