Need to start the loop.

This commit is contained in:
2023-04-15 22:34:42 -04:00
parent 5d0aaf53a8
commit d21e2182b8
+9
View File
@@ -16,6 +16,15 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
def __init__(self, bot: commands.Bot) -> None: def __init__(self, bot: commands.Bot) -> None:
self.bot = bot self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
"""
Starts the loop when bot is ready.
"""
await self.bot.wait_until_ready()
# pylint doesn't recognize that periodic_update_guild_data is subclassed from tasks.loop.
await self.do_thing.start() # pylint: disable=no-member
@tasks.loop(time=time(hour=0, tzinfo=timezone("GMT"))) @tasks.loop(time=time(hour=0, tzinfo=timezone("GMT")))
async def do_thing(self): async def do_thing(self):
""" """ """ """