diff options
| author | 2019-10-02 07:52:37 +0530 | |
|---|---|---|
| committer | 2019-10-02 07:52:37 +0530 | |
| commit | efc7a5146f922a0d70375355dfe84c9d7d63ff70 (patch) | |
| tree | b25310b56d008e0d5f05bc7d460a9640b69e7080 /bot/seasons/easter/easter_riddle.py | |
| parent | added function annotations to the check method (diff) | |
| parent | Point setup guide to site wiki (diff) | |
Merge branch 'master' into trivia_quiz
Diffstat (limited to 'bot/seasons/easter/easter_riddle.py')
| -rw-r--r-- | bot/seasons/easter/easter_riddle.py | 10 |
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") |