diff options
| author | 2019-09-14 01:09:53 +0800 | |
|---|---|---|
| committer | 2019-09-14 01:09:53 +0800 | |
| commit | e1dab123fc77986b09dc622457886635eb26d4ab (patch) | |
| tree | bf38f7863925b393326edf4dc04453508e545a2b /bot/seasons/easter/easter_riddle.py | |
| parent | Merge pull request #269 from python-discord/hacktoberfest-update (diff) | |
| parent | Fix incorrect merge conflict resolutions, lint remaining items (diff) | |
Merge pull request #270 from python-discord/flake8-annotations
Add Flake8 annotations
Diffstat (limited to 'bot/seasons/easter/easter_riddle.py')
| -rw-r--r-- | bot/seasons/easter/easter_riddle.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/seasons/easter/easter_riddle.py b/bot/seasons/easter/easter_riddle.py index b612f8b9..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,7 +83,7 @@ class EasterRiddle(commands.Cog): self.current_channel = None @commands.Cog.listener() - async def on_message(self, message): + 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") |