From fb30fb2c64b2ef344e71573180c0b0d80fa4673d Mon Sep 17 00:00:00 2001 From: Jade Bilkey Date: Sun, 27 Oct 2019 05:21:12 -0400 Subject: [PATCH] Hide vote count properly (#1) The vote count isn't hidden with any of the default options. This patch takes a direct approach to hiding the vote count until the poll is closed. Open to changes. --- models/poll.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/poll.py b/models/poll.py index 1e26175..0dc0c1f 100644 --- a/models/poll.py +++ b/models/poll.py @@ -1281,7 +1281,9 @@ async def generate_embed(self): # embed = self.add_field_custom(name='**Author**', value=self.author.name, embed=embed) await self.load_vote_counts() - if self.options_reaction_default: + if self.hide_count and self.is_open(): + embed = self.add_field_custom(name="**Score**", value="*hidden*", embed=embed) + elif self.options_reaction_default: if await self.is_open(): text = f'**Score** ' if self.multiple_choice == 0: