aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/magic_8ball.py
diff options
context:
space:
mode:
authorGravatar Eivind Teig <[email protected]>2020-04-02 14:39:24 +0200
committerGravatar GitHub <[email protected]>2020-04-02 14:39:24 +0200
commitd77a2bbc50305d05371197f4cfe3354cfca4c627 (patch)
treebe1eed54972d9843f66114311f93b68b579046ac /bot/seasons/evergreen/magic_8ball.py
parentMerge pull request #382 from ks129/game-fuzzy (diff)
parentMerge master: adjust `Space` cog location (diff)
Merge pull request #329 from python-discord/seasonal-purge
Deseasonify: Make all cogs available year-round, and manage only branding by season.
Diffstat (limited to 'bot/seasons/evergreen/magic_8ball.py')
-rw-r--r--bot/seasons/evergreen/magic_8ball.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/bot/seasons/evergreen/magic_8ball.py b/bot/seasons/evergreen/magic_8ball.py
deleted file mode 100644
index e47ef454..00000000
--- a/bot/seasons/evergreen/magic_8ball.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import json
-import logging
-import random
-from pathlib import Path
-
-from discord.ext import commands
-
-log = logging.getLogger(__name__)
-
-
-class Magic8ball(commands.Cog):
- """A Magic 8ball command to respond to a user's question."""
-
- 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: commands.Context, *, question: str) -> None:
- """Return a Magic 8ball answer from answers list."""
- if len(question.split()) >= 3:
- answer = random.choice(self.answers)
- await ctx.send(answer)
- else:
- await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)")
-
-
-def setup(bot: commands.Bot) -> None:
- """Magic 8ball Cog load."""
- bot.add_cog(Magic8ball(bot))
- log.info("Magic8ball cog loaded")