ctx.message is None
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 13s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 13s
This commit is contained in:
parent
2b99f83db3
commit
b8d1fbea92
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
This module is only meant to be loaded during election times.
|
This module is only meant to be loaded during election times.
|
||||||
"""
|
"""
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ class ElectionCog(commands.Cog):
|
||||||
soup = await asyncio.to_thread(BeautifulSoup, response.text, "html.parser")
|
soup = await asyncio.to_thread(BeautifulSoup, response.text, "html.parser")
|
||||||
results = await self.bot.loop.run_in_executor(None, self.process_soup, soup)
|
results = await self.bot.loop.run_in_executor(None, self.process_soup, soup)
|
||||||
if results:
|
if results:
|
||||||
date = ctx.message.created_at.date().strftime("%B %Y")
|
date = datetime.datetime.now().date().strftime("%B %Y")
|
||||||
colour_scores = {}
|
colour_scores = {}
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Election results - " + date,
|
title="Election results - " + date,
|
||||||
|
|
Loading…
Reference in a new issue