From c2e9ec459cd28832a1e797d7c755b5aab57d69dd Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Mon, 6 Apr 2020 02:13:36 +0200 Subject: Cancel permission restoration task. After the dormant command is used and the permissions are restored for the user that started the session, the task for restoring them after the claim time has passed is no longer necessary. --- bot/cogs/help_channels.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index bc973cd4d..03bac27a4 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -632,6 +632,8 @@ class HelpChannels(Scheduler, commands.Cog): return log.trace(f"Resetting send permissions for {member} ({member.id}).") await self.available_category.set_permissions(member, send_messages=None) + # Cancel task, ignore no task existing when the claim time passed but idle time has not. + self.cancel_task(member.id, ignore_missing=True) async def revoke_send_permissions(self, member: discord.Member) -> None: """ -- cgit v1.2.3