aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-10-09 13:39:27 -0700
committerGravatar MarkKoz <[email protected]>2020-10-09 13:39:27 -0700
commit59795ad20ff8a48cb1773ad02135a3da2d6e5eb9 (patch)
tree55ed5e530850da9b6822b7f077e2fe9bfe9e7b93
parentSilence tests: make _async_init attribute tests more robust (diff)
Silence: fix scheduled tasks not being cancelled on unload
-rw-r--r--bot/cogs/moderation/silence.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py
index 80c4e6a25..c54f9d849 100644
--- a/bot/cogs/moderation/silence.py
+++ b/bot/cogs/moderation/silence.py
@@ -234,7 +234,7 @@ class Silence(commands.Cog):
# more tasks after cancel_all has finished, despite _init_task.cancel being called first.
# This is cause cancel() on its own doesn't block until the task is cancelled.
self._init_task.cancel()
- self._init_task.add_done_callback(lambda _: self.scheduler.cancel_all)
+ self._init_task.add_done_callback(lambda _: self.scheduler.cancel_all())
# This cannot be static (must have a __func__ attribute).
def cog_check(self, ctx: Context) -> bool: