aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/magic_8ball.py
diff options
context:
space:
mode:
authorGravatar Janine vN <[email protected]>2021-09-05 00:31:20 -0400
committerGravatar Janine vN <[email protected]>2021-09-05 00:31:20 -0400
commit02512e43f3d68ffd89654c5f2e9e3e9a27c0c018 (patch)
tree4b62a6dbb39601f02aa435c7eb8a10433585c3bb /bot/exts/evergreen/magic_8ball.py
parentMove snakes commands into fun folder (diff)
Move game and fun commands to Fun folder, fix ddg
This moves all the fun commands and games into the fun folder. This commit also makes changes to the duck_game. It was setting a footer during an embed init, which is no longer possible with the version of d.py we use. Additionally, an issue with editing an embed that had a local image loaded. The workaround for the time being is to update the message, not the embed.
Diffstat (limited to 'bot/exts/evergreen/magic_8ball.py')
-rw-r--r--bot/exts/evergreen/magic_8ball.py30
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())