aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/easter/easter_riddle.py
diff options
context:
space:
mode:
authorGravatar RohanJnr <[email protected]>2019-10-02 09:39:10 +0530
committerGravatar RohanJnr <[email protected]>2019-10-02 09:39:10 +0530
commitcd5842811f92bd5c82a164d33ad71a9c7c172e57 (patch)
tree4a15827a3d94cbc78fa8a9a5b47cdd57283f304e /bot/seasons/easter/easter_riddle.py
parentWorked on the requested changes and also made a few other changes: (diff)
parentMerge branch 'master' into trivia_quiz (diff)
Merge branch 'trivia_quiz' of https://github.com/RohanJnr/seasonalbot into trivia_quiz
Diffstat (limited to 'bot/seasons/easter/easter_riddle.py')
-rw-r--r--bot/seasons/easter/easter_riddle.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/seasons/easter/easter_riddle.py b/bot/seasons/easter/easter_riddle.py
index 56555586..4b98b204 100644
--- a/bot/seasons/easter/easter_riddle.py
+++ b/bot/seasons/easter/easter_riddle.py
@@ -20,14 +20,14 @@ TIMELIMIT = 10
class EasterRiddle(commands.Cog):
"""This cog contains the command for the Easter quiz!"""
- def __init__(self, bot):
+ def __init__(self, bot: commands.Bot):
self.bot = bot
self.winners = []
self.correct = ""
self.current_channel = None
@commands.command(aliases=["riddlemethis", "riddleme"])
- async def riddle(self, ctx):
+ async def riddle(self, ctx: commands.Context) -> None:
"""
Gives a random riddle, then provides 2 hints at certain intervals before revealing the answer.
@@ -83,8 +83,8 @@ class EasterRiddle(commands.Cog):
self.current_channel = None
@commands.Cog.listener()
- async def on_message(self, message):
- """If a non-bot user enters a correct answer, their username gets added to self.winners"""
+ async def on_message(self, message: discord.Messaged) -> None:
+ """If a non-bot user enters a correct answer, their username gets added to self.winners."""
if self.current_channel != message.channel:
return
@@ -95,7 +95,7 @@ class EasterRiddle(commands.Cog):
self.winners.append(message.author.mention)
-def setup(bot):
+def setup(bot: commands.Bot) -> None:
"""Easter Riddle Cog load."""
bot.add_cog(EasterRiddle(bot))
log.info("Easter Riddle bot loaded")