aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-10-11 14:43:46 -0700
committerGravatar MarkKoz <[email protected]>2019-10-11 14:43:46 -0700
commit1081178eb67b0706c1706f452e562c6ad1edb77a (patch)
treede06595bd0eda63a2b6c7128cd0546036c59d395
parentBetter check way of checking timelaps (diff)
Cancel the periodic ping task when the verification cog is unloaded
-rw-r--r--bot/cogs/verification.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py
index 204981d80..74e1b333b 100644
--- a/bot/cogs/verification.py
+++ b/bot/cogs/verification.py
@@ -184,6 +184,10 @@ class Verification(Cog):
"""Only start the loop when the bot is ready."""
await self.bot.wait_until_ready()
+ def cog_unload(self) -> None:
+ """Cancel the periodic ping task when the cog is unloaded."""
+ self.periodic_ping.cancel()
+
def setup(bot: Bot) -> None:
"""Verification cog load."""