Fix reminder loop close
This commit is contained in:
parent
91cb282c29
commit
0e1cd21681
1 changed files with 3 additions and 1 deletions
|
@ -115,6 +115,9 @@ class Reminders(commands.Cog):
|
||||||
await ctx.send("An error occurred !")
|
await ctx.send("An error occurred !")
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
|
def cog_unload(self):
|
||||||
|
self.reminders_loop.stop()
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
logger.info(f"Loading...")
|
logger.info(f"Loading...")
|
||||||
|
@ -131,7 +134,6 @@ def setup(bot):
|
||||||
def teardown(bot):
|
def teardown(bot):
|
||||||
logger.info(f"Unloading...")
|
logger.info(f"Unloading...")
|
||||||
try:
|
try:
|
||||||
bot.get_cog("Reminders").reminders_loop.stop()
|
|
||||||
bot.remove_cog("Reminders")
|
bot.remove_cog("Reminders")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error unloading: {e}")
|
logger.error(f"Error unloading: {e}")
|
||||||
|
|
Reference in a new issue