aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/reminders.py
diff options
context:
space:
mode:
authorGravatar Dennis Pham <[email protected]>2020-08-09 14:07:58 -0400
committerGravatar GitHub <[email protected]>2020-08-09 14:07:58 -0400
commitc8c33879d098569ae9eefc44c067ff6a780ca3f6 (patch)
treea6d442fe4f46c1d20f0dee6ba0aeb49d2e91b462 /bot/cogs/reminders.py
parentFiltering: ignore webhooks for nickname filter (diff)
parentMerge pull request #1085 from python-discord/bug/util/1079/long-poll-titles (diff)
Merge branch 'master' into bug/filters/1027/ignore-webhook-names
Diffstat (limited to '')
-rw-r--r--bot/cogs/reminders.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
index b5998cc0e..670493bcf 100644
--- a/bot/cogs/reminders.py
+++ b/bot/cogs/reminders.py
@@ -37,6 +37,10 @@ class Reminders(Cog):
self.bot.loop.create_task(self.reschedule_reminders())
+ def cog_unload(self) -> None:
+ """Cancel scheduled tasks."""
+ self.scheduler.cancel_all()
+
async def reschedule_reminders(self) -> None:
"""Get all current reminders from the API and reschedule them."""
await self.bot.wait_until_guild_available()