foxwells.vinboard: fix webhook var ref

This commit is contained in:
Cynthia Foxwell 2022-12-02 23:14:37 -07:00
parent 4011ef0387
commit cb032899b8

View file

@ -276,7 +276,7 @@ async function processReaction(msg, user, reaction) {
if (trueCount == 0) { if (trueCount == 0) {
logger.verbose("vinboard", `Deleting entry for "${msg.id}"`); logger.verbose("vinboard", `Deleting entry for "${msg.id}"`);
if (dbEntry.board_id) { if (dbEntry.board_id) {
await webhook.deleteMessage( await vinboard_webhook.deleteMessage(
dbEntry.board_id, dbEntry.board_id,
"[Vinboard] Message has 0 reactions now." "[Vinboard] Message has 0 reactions now."
); );
@ -297,7 +297,7 @@ async function processReaction(msg, user, reaction) {
await setBoardEntry(msg.id, trueCount, dbEntry.board_id); await setBoardEntry(msg.id, trueCount, dbEntry.board_id);
} else { } else {
logger.verbose("vinboard", `Creating entry for "${msg.id}"`); logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
const boardMessage = await webhook.execute( const boardMessage = await vinboard_webhook.execute(
await createBoardMessage(msg, trueCount) await createBoardMessage(msg, trueCount)
); );
await setBoardEntry(msg.id, trueCount, boardMessage.id); await setBoardEntry(msg.id, trueCount, boardMessage.id);
@ -305,7 +305,7 @@ async function processReaction(msg, user, reaction) {
} }
} else { } else {
logger.verbose("vinboard", `Creating entry for "${msg.id}"`); logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
const boardMessage = await webhook.execute( const boardMessage = await vinboard_webhook.execute(
await createBoardMessage(msg, trueCount) await createBoardMessage(msg, trueCount)
); );
await setBoardEntry(msg.id, trueCount, boardMessage.id); await setBoardEntry(msg.id, trueCount, boardMessage.id);