diff options
| author | 2020-04-09 18:02:30 +0200 | |
|---|---|---|
| committer | 2020-04-09 20:28:09 +0200 | |
| commit | d0a9404cb0cfee64bf26df5ec7cce2ea71cb4f15 (patch) | |
| tree | db89f086776fec588d0f25baa14a49b1846cdbd1 | |
| parent | Reverse order of moving to dormant and task cancellation. (diff) | |
Delete channel from claimant cache.
Deleting the channel from the claimant cache on
invokation of the dormant command prevents users running
the command multiple times before the bot moves it.
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/help_channels.py | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 69812eda0..346d35aa8 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -210,6 +210,9 @@ class HelpChannels(Scheduler, commands.Cog):          log.trace("dormant command invoked; checking if the channel is in-use.")          if ctx.channel.category == self.in_use_category:              if await self.dormant_check(ctx): +                with suppress(KeyError): +                    del self.help_channel_claimants[ctx.channel] +                  with suppress(discord.errors.NotFound):                      log.trace("Deleting dormant invokation message.")                      await ctx.message.delete() | 
