diff options
author | 2021-09-05 00:12:47 -0400 | |
---|---|---|
committer | 2021-09-05 00:12:47 -0400 | |
commit | 66c888ad68ad88ba1d39c2ac4824469560b8c29a (patch) | |
tree | 706917000c39c3af1fc92c47fd59fe31a63f601a /bot/exts/evergreen/pythonfacts.py | |
parent | Move internal eval and rename utils to core (diff) |
Move practical functions into utilities folder
Separates out the useful/practical seasonal bot features from the
evergreen folder into a "utilities" folder.
Adjusts the paths to resources to reflect the folder move.
Diffstat (limited to 'bot/exts/evergreen/pythonfacts.py')
-rw-r--r-- | bot/exts/evergreen/pythonfacts.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/bot/exts/evergreen/pythonfacts.py b/bot/exts/evergreen/pythonfacts.py deleted file mode 100644 index 80a8da5d..00000000 --- a/bot/exts/evergreen/pythonfacts.py +++ /dev/null @@ -1,36 +0,0 @@ -import itertools - -import discord -from discord.ext import commands - -from bot.bot import Bot -from bot.constants import Colours - -with open("bot/resources/evergreen/python_facts.txt") as file: - FACTS = itertools.cycle(list(file)) - -COLORS = itertools.cycle([Colours.python_blue, Colours.python_yellow]) -PYFACTS_DISCUSSION = "https://github.com/python-discord/meta/discussions/93" - - -class PythonFacts(commands.Cog): - """Sends a random fun fact about Python.""" - - @commands.command(name="pythonfact", aliases=("pyfact",)) - async def get_python_fact(self, ctx: commands.Context) -> None: - """Sends a Random fun fact about Python.""" - embed = discord.Embed( - title="Python Facts", - description=next(FACTS), - colour=next(COLORS) - ) - embed.add_field( - name="Suggestions", - value=f"Suggest more facts [here!]({PYFACTS_DISCUSSION})" - ) - await ctx.send(embed=embed) - - -def setup(bot: Bot) -> None: - """Load the PythonFacts Cog.""" - bot.add_cog(PythonFacts()) |