More fixes

merge-requests/24/head
Hiroyuki 2021-03-24 00:20:02 -04:00
parent d5b009b186
commit 1c3291b182
No known key found for this signature in database
GPG Key ID: C15AC26538975A24
2 changed files with 5 additions and 2 deletions

View File

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

View File

@ -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;