diff options
| author | 2019-03-30 10:40:38 -0400 | |
|---|---|---|
| committer | 2019-03-30 10:42:02 -0400 | |
| commit | 095dc1791f147682023edafc59abdc4019074eeb (patch) | |
| tree | 160d7ee160042befbfba778e54507a5eee3bd686 /bot/seasons/evergreen/magic_8ball.py | |
| parent | Merge branch 'master' into hotfix (diff) | |
| parent | Merge pull request #146 from python-discord/flake8-docstring (diff) | |
Merge branch 'master' into hotfix
Diffstat (limited to 'bot/seasons/evergreen/magic_8ball.py')
| -rw-r--r-- | bot/seasons/evergreen/magic_8ball.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bot/seasons/evergreen/magic_8ball.py b/bot/seasons/evergreen/magic_8ball.py index 8e2f9164..0b4eeb62 100644 --- a/bot/seasons/evergreen/magic_8ball.py +++ b/bot/seasons/evergreen/magic_8ball.py @@ -9,9 +9,7 @@ log = logging.getLogger(__name__) class Magic8ball(commands.Cog): - """ - A Magic 8ball command to respond to a users question. - """ + """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.Cog): @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(commands.Cog): 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") |