1
0
Fork 0

Fix reminder loop close

This commit is contained in:
Ethanell 2020-05-28 17:27:35 +02:00
parent 91cb282c29
commit 0e1cd21681

View file

@ -115,6 +115,9 @@ class Reminders(commands.Cog):
await ctx.send("An error occurred !")
raise error
def cog_unload(self):
self.reminders_loop.stop()
def setup(bot):
logger.info(f"Loading...")
@ -131,7 +134,6 @@ def setup(bot):
def teardown(bot):
logger.info(f"Unloading...")
try:
bot.get_cog("Reminders").reminders_loop.stop()
bot.remove_cog("Reminders")
except Exception as e:
logger.error(f"Error unloading: {e}")