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.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot/seasons/halloween/monstersurvey.py b/bot/seasons/halloween/monstersurvey.py
index 6e71a007..12e1d022 100644
--- a/bot/seasons/halloween/monstersurvey.py
+++ b/bot/seasons/halloween/monstersurvey.py
@@ -30,7 +30,7 @@ class MonsterSurvey(Cog):
with open(self.registry_location, 'r') as jason:
self.voter_registry = json.load(jason)
- def json_write(self):
+ def json_write(self) -> None:
"""Write voting results to a local JSON file."""
log.info("Saved Monster Survey Results")
with open(self.registry_location, 'w') as jason:
@@ -50,7 +50,7 @@ class MonsterSurvey(Cog):
if id in vr[m]['votes'] and m != monster:
vr[m]['votes'].remove(id)
- def get_name_by_leaderboard_index(self, n):
+ def get_name_by_leaderboard_index(self, n: int) -> str:
"""Return the monster at the specified leaderboard index."""
n = n - 1
vr = self.voter_registry
@@ -62,7 +62,7 @@ class MonsterSurvey(Cog):
name='monster',
aliases=('mon',)
)
- async def monster_group(self, ctx: Context):
+ async def monster_group(self, ctx: Context) -> None:
"""The base voting command. If nothing is called, then it will return an embed."""
if ctx.invoked_subcommand is None:
async with ctx.typing():
@@ -92,7 +92,7 @@ class MonsterSurvey(Cog):
@monster_group.command(
name='vote'
)
- async def monster_vote(self, ctx: Context, name=None):
+ async def monster_vote(self, ctx: Context, name: str = None) -> None:
"""
Cast a vote for a particular monster.
@@ -143,7 +143,7 @@ class MonsterSurvey(Cog):
@monster_group.command(
name='show'
)
- async def monster_show(self, ctx: Context, name=None) -> None:
+ async def monster_show(self, ctx: Context, name: str = 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)
@@ -200,7 +200,7 @@ class MonsterSurvey(Cog):
await ctx.send(embed=embed)
-def setup(bot):
+def setup(bot: Bot) -> None:
"""Monster survey Cog load."""
bot.add_cog(MonsterSurvey(bot))
log.info("MonsterSurvey cog loaded")