From ff00b624ecd6870ac4e942bb6b644a2974ba415e Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sun, 8 Sep 2024 13:06:27 +0200 Subject: [PATCH] poll: fix get_votes --- src/distbot/plugins/votepoll.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/distbot/plugins/votepoll.py b/src/distbot/plugins/votepoll.py index 0f421c4..0111cf3 100644 --- a/src/distbot/plugins/votepoll.py +++ b/src/distbot/plugins/votepoll.py @@ -50,7 +50,7 @@ class Poll: def get_votes(self, option: str) -> int: option = self.option(option) if option: - return len(self.votes.get(option, [])) + return len([vote for vote in self.votes.values() if vote == option]) @staticmethod def generate_key(options: list[str]) -> str: -- 2.39.2