fix(moderation): handle_expiry task is now actually started
Some checks failed
Pylint / Pylint (push) Failing after 1m13s
Some checks failed
Pylint / Pylint (push) Failing after 1m13s
This commit is contained in:
parent
af011e047b
commit
a8ea15a5c6
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,7 @@ class Moderation(commands.Cog):
|
||||||
ignore_other_bots = True
|
ignore_other_bots = True
|
||||||
)
|
)
|
||||||
disable_dateutil()
|
disable_dateutil()
|
||||||
|
self.handle_expiry.start()
|
||||||
|
|
||||||
async def cog_load(self):
|
async def cog_load(self):
|
||||||
"""This method prepares the database schema for all of the guilds the bot is currently in."""
|
"""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:
|
except ConnectionRefusedError:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def cog_unload(self):
|
||||||
|
self.handle_expiry.cancel()
|
||||||
|
|
||||||
@commands.Cog.listener('on_guild_join')
|
@commands.Cog.listener('on_guild_join')
|
||||||
async def db_generate_guild_join(self, guild: discord.Guild):
|
async def db_generate_guild_join(self, guild: discord.Guild):
|
||||||
"""This method prepares the database schema whenever the bot joins a guild."""
|
"""This method prepares the database schema whenever the bot joins a guild."""
|
||||||
|
|
Loading…
Reference in a new issue