From c3c20edde4c39ffa6d40b91995a6ebf1d8829120 Mon Sep 17 00:00:00 2001 From: Hiroyuki Date: Wed, 24 Mar 2021 21:10:26 -0400 Subject: [PATCH] Possible fix for Proclamations --- src/events/messageReactionAdd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/messageReactionAdd.ts b/src/events/messageReactionAdd.ts index 5beeb44..158029b 100644 --- a/src/events/messageReactionAdd.ts +++ b/src/events/messageReactionAdd.ts @@ -32,7 +32,7 @@ export default class MessageReactionAdd extends Event { const proc = await this.client.db.Proclamation.findOne({ msg: message.id, processed: false }); - if (!proc?.votedDirectors.includes(reactor.id)) { + if (proc && !proc?.votedDirectors.includes(reactor.id)) { let type: 'yea' | 'nay' | 'present'; if (emoji.id === '578750988907970567') type = 'yea';