Fix incorrect sorting in stats ca

pull/31/head
Stijn De Clercq 2021-01-24 22:00:24 +01:00
parent 25f4ac5314
commit d9d8c6a842
3 changed files with 12 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class Stats(commands.Cog):
embed.set_author(name="Channel Activity - {}".format(ctx.guild))
description = ""
for c in sorted(res, key=lambda x: int(x[1]), reverse=True):
for c in sorted(res, key=lambda x: float(x[1]), reverse=True):
if not any(tc.id == int(c[0]) for tc in ctx.guild.text_channels):
continue

View File

@ -218,6 +218,10 @@ class Tasks(commands.Cog):
async def beforeSendReminders(self):
await self.client.wait_until_ready()
# TODO
async def updateMatchweek(self):
pass
def getCurrentHour(self):
return timeFormatters.dateTimeNow().hour

View File

@ -43,3 +43,10 @@ def google_search(query):
divs = bs.find_all("div", attrs={"class": "g"})
return list(getContent(d) for d in divs), 200
def getMatchweek():
"""
Parses the current JPL matchweek out of Sporza's site
"""
pass