aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-04-06 02:13:36 +0200
committerGravatar Numerlor <[email protected]>2020-04-09 20:24:40 +0200
commitc2e9ec459cd28832a1e797d7c755b5aab57d69dd (patch)
tree2c5fb316e6905c876c9e3988e21b550c12970f0c
parentHandle dormant invokation not being found. (diff)
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.
-rw-r--r--bot/cogs/help_channels.py2
1 files changed, 2 insertions, 0 deletions
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:
"""