From 13d8263edc1880878c7af827baa93502ff7395a5 Mon Sep 17 00:00:00 2001 From: Daniel Milnes Date: Mon, 2 Mar 2020 22:11:30 +0000 Subject: [PATCH] Add votercount command --- electionsbot/cogs/election.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/electionsbot/cogs/election.py b/electionsbot/cogs/election.py index 0d43133..dc3680e 100644 --- a/electionsbot/cogs/election.py +++ b/electionsbot/cogs/election.py @@ -134,6 +134,11 @@ async def allCandidateDetails(self, ctx): for candidate in self.getAllCandidates(): await ctx.send(embed=candidate.getEmbed()) + @commands.has_role(ROOT_ROLE_ID) + @commands.command(aliases=["voters"]) + async def voterCount(self, ctx): + return await ctx.send(f"{await connectPostgres().fetchval('SELECT COUNT(*) FROM votes')} votes recorded!") + @commands.has_role(ROOT_ROLE_ID) @commands.command(aliases=["electiontotals"]) async def viewTotals(self, ctx):