Add more metadata to embed
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 8s

This commit is contained in:
Nexus 2024-05-03 20:37:08 +01:00
parent 59e208b4c7
commit 7004911783
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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 = []