aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/halloween/monstersurvey.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/halloween/monstersurvey.py')
-rw-r--r--bot/seasons/halloween/monstersurvey.py25
1 files changed, 5 insertions, 20 deletions
diff --git a/bot/seasons/halloween/monstersurvey.py b/bot/seasons/halloween/monstersurvey.py
index 4e967cca..173ce8eb 100644
--- a/bot/seasons/halloween/monstersurvey.py
+++ b/bot/seasons/halloween/monstersurvey.py
@@ -36,15 +36,11 @@ class MonsterSurvey(Cog):
with open(self.registry_location, 'w') as jason:
json.dump(self.voter_registry, jason, indent=2)
- def cast_vote(self, id: int, monster: str):
+ def cast_vote(self, id: int, monster: str) -> None:
"""
Cast a user's vote for the specified monster.
If the user has already voted, their existing vote is removed.
-
- :param id: The id of the person voting
- :param monster: the string key of the json that represents a monster
- :return: None
"""
vr = self.voter_registry
for m in vr.keys():
@@ -147,14 +143,8 @@ class MonsterSurvey(Cog):
@monster_group.command(
name='show'
)
- async def monster_show(self, ctx: Context, name=None):
- """
- Shows the named monster. If one is not named, it sends the default voting embed instead.
-
- :param ctx:
- :param name:
- :return:
- """
+ async def monster_show(self, ctx: Context, name=None) -> None:
+ """Shows the named monster. If one is not named, it sends the default voting embed instead."""
if name is None:
await ctx.invoke(self.monster_leaderboard)
return
@@ -184,13 +174,8 @@ class MonsterSurvey(Cog):
name='leaderboard',
aliases=('lb',)
)
- async def monster_leaderboard(self, ctx: Context):
- """
- Shows the current standings.
-
- :param ctx:
- :return:
- """
+ async def monster_leaderboard(self, ctx: Context) -> None:
+ """Shows the current standings."""
async with ctx.typing():
vr = self.voter_registry
top = sorted(vr, key=lambda k: len(vr[k]['votes']), reverse=True)