aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/magic_8ball.py
diff options
context:
space:
mode:
authorGravatar Kieran Siek <[email protected]>2019-09-14 01:09:53 +0800
committerGravatar GitHub <[email protected]>2019-09-14 01:09:53 +0800
commite1dab123fc77986b09dc622457886635eb26d4ab (patch)
treebf38f7863925b393326edf4dc04453508e545a2b /bot/seasons/evergreen/magic_8ball.py
parentMerge pull request #269 from python-discord/hacktoberfest-update (diff)
parentFix 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/evergreen/magic_8ball.py')
-rw-r--r--bot/seasons/evergreen/magic_8ball.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/seasons/evergreen/magic_8ball.py b/bot/seasons/evergreen/magic_8ball.py
index 55652af7..e47ef454 100644
--- a/bot/seasons/evergreen/magic_8ball.py
+++ b/bot/seasons/evergreen/magic_8ball.py
@@ -11,13 +11,13 @@ log = logging.getLogger(__name__)
class Magic8ball(commands.Cog):
"""A Magic 8ball command to respond to a user's question."""
- def __init__(self, bot):
+ def __init__(self, bot: commands.Bot):
self.bot = bot
with open(Path("bot/resources/evergreen/magic8ball.json"), "r") as file:
self.answers = json.load(file)
@commands.command(name="8ball")
- async def output_answer(self, ctx, *, question):
+ async def output_answer(self, ctx: commands.Context, *, question: str) -> None:
"""Return a Magic 8ball answer from answers list."""
if len(question.split()) >= 3:
answer = random.choice(self.answers)
@@ -26,7 +26,7 @@ class Magic8ball(commands.Cog):
await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)")
-def setup(bot):
+def setup(bot: commands.Bot) -> None:
"""Magic 8ball Cog load."""
bot.add_cog(Magic8ball(bot))
log.info("Magic8ball cog loaded")