foxwells.vinboard: properly preserve embed

This commit is contained in:
Cynthia Foxwell 2022-12-03 10:27:36 -07:00
parent df3167f33f
commit 72315f5248

View file

@ -322,10 +322,17 @@ async function processReaction(_msg, user, reaction) {
} -> ${trueCount})`
);
const props = await createBoardMessage(msg, trueCount, false);
const props = {
avatarURL: _boardMessage.author.avatarURL("png", 256),
username: _boardMessage.author.username,
threadID: VINBOARD_THREAD_ID,
embeds: _boardMessage.embeds,
wait: true,
};
props.attachments = [..._boardMessage.attachments.values()].map(
(attach) => ({id: attach.id})
);
props.embeds[0].title = `${trueCount} \u2b50`;
await vinboard_webhook.editMessage(_boardMessage.id, props);
await setBoardEntry(msg.id, trueCount, _boardMessage.id);
} else {