From 70049117830bf121c3ddf4aa762a042a88b8f009 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Fri, 3 May 2024 20:37:08 +0100 Subject: [PATCH] Add more metadata to embed --- src/cogs/election.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cogs/election.py b/src/cogs/election.py index 9b36b39..c09c83d 100644 --- a/src/cogs/election.py +++ b/src/cogs/election.py @@ -111,11 +111,13 @@ class ElectionCog(commands.Cog): soup = await asyncio.to_thread(BeautifulSoup, response.text, "html.parser") results = await self.bot.loop.run_in_executor(None, self.process_soup, soup) if results: - date = datetime.datetime.now().date().strftime("%B %Y") + now = discord.utils.utcnow() + date = now.date().strftime("%B %Y") colour_scores = {} embed = discord.Embed( title="Election results - " + date, - url="https://bbc.co.uk/" + url="https://bbc.co.uk/", + timestamp=now ) embed.set_footer(text="Source from bbc.co.uk.") description_parts = []