From 1c3291b182ab3c79e2ff644038367f722933e6ae Mon Sep 17 00:00:00 2001 From: Hiroyuki Date: Wed, 24 Mar 2021 00:20:02 -0400 Subject: [PATCH] More fixes --- src/api/board.ins/routes/root.ts | 4 ++-- src/events/messageReactionAdd.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/board.ins/routes/root.ts b/src/api/board.ins/routes/root.ts index 0274264..3d8219f 100644 --- a/src/api/board.ins/routes/root.ts +++ b/src/api/board.ins/routes/root.ts @@ -968,8 +968,8 @@ export default class Root extends Route { confirmationEmbed.addField('Results', `**Total:** ${total.length}\n**Yea:** ${yea}\n**Nay:** ${nay}\n**Present:** ${present}\n**Absent:** ${absent}`); await this.directorLogs.createMessage({ embed: confirmationEmbed }); - const excludingYea = nay + present + absent; - if (yea > excludingYea) { + const totalDirectors = yea + nay + present + absent; + if (yea / totalDirectors >= 0.6) { const resolutionEmbed = this.genEmbed( motion.oID, 'res', diff --git a/src/events/messageReactionAdd.ts b/src/events/messageReactionAdd.ts index ad4daee..5beeb44 100644 --- a/src/events/messageReactionAdd.ts +++ b/src/events/messageReactionAdd.ts @@ -49,6 +49,7 @@ export default class MessageReactionAdd extends Event { ...proc.results, yea: votes.yea, }, + votedDirectors: [...proc.votedDirectors, reactor.id], }); break; @@ -59,6 +60,7 @@ export default class MessageReactionAdd extends Event { ...proc.results, nay: votes.nay, }, + votedDirectors: [...proc.votedDirectors, reactor.id], }); break; @@ -69,6 +71,7 @@ export default class MessageReactionAdd extends Event { ...proc.results, present: votes.present, }, + votedDirectors: [...proc.votedDirectors, reactor.id], }); break;