From 7d84d121b323a7997bf734a8535a10265d0bc9d8 Mon Sep 17 00:00:00 2001 From: Darth Delay Date: Wed, 20 Feb 2019 17:48:43 +0100 Subject: Update whoisvalentine.py to address requested changes A few things have been changed to address the changes listed under PR #122: - Changed the color tag of the embed from both commands from discord.Color.dark_magenta() to bots.constants.Colours.pink - Renamed valentine_facts to valentine_fact These changes are needed to fit the projects standards. --- bot/seasons/valentines/whoisvalentine.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bot') diff --git a/bot/seasons/valentines/whoisvalentine.py b/bot/seasons/valentines/whoisvalentine.py index 53003b52..2fe07aba 100644 --- a/bot/seasons/valentines/whoisvalentine.py +++ b/bot/seasons/valentines/whoisvalentine.py @@ -6,6 +6,8 @@ from random import choice import discord from discord.ext import commands +from bot.constants import Colours + log = logging.getLogger(__name__) with open(Path("bot", "resources", "valentines", "valentine_facts.json"), "r") as file: @@ -24,7 +26,7 @@ class ValentineFacts: embed = discord.Embed( title="Who is Saint Valentine?", description=FACTS['whois'], - color=discord.Color.dark_magenta() + color=Colours.pink ) embed.set_thumbnail( url='https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Saint_Valentine_-_' @@ -34,14 +36,14 @@ class ValentineFacts: await ctx.channel.send(embed=embed) @commands.command() - async def valentine_facts(self, ctx): + async def valentine_fact(self, ctx): """ Shows a random fact about Valentine's Day. """ embed = discord.Embed( title=choice(FACTS['titles']), description=choice(FACTS['text']), - color=discord.Color.dark_magenta() + color=Colours.pink ) await ctx.channel.send(embed=embed) -- cgit v1.2.3