diff options
author | 2019-05-11 04:51:30 +1000 | |
---|---|---|
committer | 2019-05-11 04:51:30 +1000 | |
commit | 0e2c6a1b0daef5b569da7652801b5725bf1ed95b (patch) | |
tree | c3d57e50f2ba07cb2d9e7476d3b9441c1f671bd9 /bot/seasons/evergreen/magic_8ball.py | |
parent | not importing aiohttp now (diff) | |
parent | Merge pull request #198 from Suhail6inkling/constants_fix (diff) |
Merge branch 'master' into hanukkah_embed_iceman
Diffstat (limited to 'bot/seasons/evergreen/magic_8ball.py')
-rw-r--r-- | bot/seasons/evergreen/magic_8ball.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bot/seasons/evergreen/magic_8ball.py b/bot/seasons/evergreen/magic_8ball.py index 88c9fd26..0b4eeb62 100644 --- a/bot/seasons/evergreen/magic_8ball.py +++ b/bot/seasons/evergreen/magic_8ball.py @@ -8,10 +8,8 @@ from discord.ext import commands log = logging.getLogger(__name__) -class Magic8ball: - """ - A Magic 8ball command to respond to a users question. - """ +class Magic8ball(commands.Cog): + """A Magic 8ball command to respond to a user's question.""" def __init__(self, bot): self.bot = bot @@ -20,9 +18,7 @@ class Magic8ball: @commands.command(name="8ball") async def output_answer(self, ctx, *, question): - """ - Return a magic 8 ball answer from answers list. - """ + """Return a magic 8 ball answer from answers list.""" if len(question.split()) >= 3: answer = random.choice(self.answers) await ctx.send(answer) @@ -30,7 +26,8 @@ class Magic8ball: await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)") -# Required in order to load the cog, use the class name in the add_cog function. def setup(bot): + """Magic 8ball cog load.""" + bot.add_cog(Magic8ball(bot)) - log.info("Magic 8ball cog loaded") + log.info("Magic8ball cog loaded") |