diff options
| author | 2021-09-07 07:34:57 -0400 | |
|---|---|---|
| committer | 2021-09-07 07:34:57 -0400 | |
| commit | 1e711f3e04c6e6adb66159ffbdc4f72740b62fd7 (patch) | |
| tree | af1eae3a95b557ee27cf7577b67b8fecf90b1752 /bot/exts/evergreen/magic_8ball.py | |
| parent | Added ryanzec_colours.json constructed from ryanzec/name-that-color (diff) | |
| parent | Continue work in progress (diff) | |
Fixing merge conflicts
Diffstat (limited to 'bot/exts/evergreen/magic_8ball.py')
| -rw-r--r-- | bot/exts/evergreen/magic_8ball.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bot/exts/evergreen/magic_8ball.py b/bot/exts/evergreen/magic_8ball.py deleted file mode 100644 index 28ddcea0..00000000 --- a/bot/exts/evergreen/magic_8ball.py +++ /dev/null @@ -1,30 +0,0 @@ -import json -import logging -import random -from pathlib import Path - -from discord.ext import commands - -from bot.bot import Bot - -log = logging.getLogger(__name__) - -ANSWERS = json.loads(Path("bot/resources/evergreen/magic8ball.json").read_text("utf8")) - - -class Magic8ball(commands.Cog): - """A Magic 8ball command to respond to a user's question.""" - - @commands.command(name="8ball") - 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(ANSWERS) - await ctx.send(answer) - else: - await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)") - - -def setup(bot: Bot) -> None: - """Load the Magic8Ball Cog.""" - bot.add_cog(Magic8ball()) |