aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/pythonfacts.py
diff options
context:
space:
mode:
authorGravatar MrKomodoDragon <[email protected]>2021-02-16 18:21:12 -0800
committerGravatar MrKomodoDragon <[email protected]>2021-02-16 18:21:12 -0800
commit5164ba4e367efbfe78f8dd2b08646fe6605a8b42 (patch)
treeb21e6d1ed9535770136d3f3c945752c06803ef3b /bot/exts/evergreen/pythonfacts.py
parentChange Docstring for command (diff)
Add colors and move embed out of send statement; add more info about Monty Python for Fact 1
Diffstat (limited to 'bot/exts/evergreen/pythonfacts.py')
-rw-r--r--bot/exts/evergreen/pythonfacts.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/evergreen/pythonfacts.py b/bot/exts/evergreen/pythonfacts.py
index c0cdf111..734782b8 100644
--- a/bot/exts/evergreen/pythonfacts.py
+++ b/bot/exts/evergreen/pythonfacts.py
@@ -7,9 +7,11 @@ from discord.ext import commands
with open('bot/resources/evergreen/python_facts.txt') as file:
FACTS = list(file)
+COLORS = [0x4B8BBE, 0xFFD43B, ]
+
class PythonFacts(commands.Cog):
- """Gives a random fun fact about Python."""
+ """Sends a random fun fact about Python."""
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@@ -17,7 +19,8 @@ class PythonFacts(commands.Cog):
@commands.command(name='pythonfact', aliases=['pyfact'])
async def get_python_fact(self, ctx: commands.Context) -> None:
"""Sends a Random fun fact about Python."""
- await ctx.send(embed=discord.Embed(title='Python Facts', description=random.choice(FACTS)))
+ embed = discord.Embed(title='Python Facts', description=random.choice(FACTS), colour=random.choice(COLORS))
+ await ctx.send(embed=embed)
def setup(bot: commands.Bot) -> None: