From a8ea15a5c6f45490997800f8eb5929f059c1d71f Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 5 Oct 2023 13:51:17 -0400 Subject: [PATCH] fix(moderation): handle_expiry task is now actually started --- moderation/moderation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moderation/moderation.py b/moderation/moderation.py index 7280dd5..6b333cf 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -25,6 +25,7 @@ class Moderation(commands.Cog): ignore_other_bots = True ) disable_dateutil() + self.handle_expiry.start() async def cog_load(self): """This method prepares the database schema for all of the guilds the bot is currently in.""" @@ -44,6 +45,9 @@ class Moderation(commands.Cog): except ConnectionRefusedError: return + def cog_unload(self): + self.handle_expiry.cancel() + @commands.Cog.listener('on_guild_join') async def db_generate_guild_join(self, guild: discord.Guild): """This method prepares the database schema whenever the bot joins a guild."""