diff options
| author | 2021-01-04 17:17:47 -0800 | |
|---|---|---|
| committer | 2021-01-04 23:20:03 -0800 | |
| commit | 86babd4a90414d246f1b14cad80a367cc155f2ac (patch) | |
| tree | 50cef6f1c3a6f5213f8bcbd11670c70b234eef59 | |
| parent | HelpChannels: fix manual use of lock decorator (diff) | |
HelpChannels: fix unclaim exiting too early if claimant is None
| -rw-r--r-- | bot/exts/help_channels/_cog.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 3bdd896f2..0995c8a79 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -384,10 +384,8 @@ class HelpChannels(commands.Cog): claimant = self.bot.get_guild(constants.Guild.id).get_member(claimant_id) if claimant is None: log.info(f"{claimant_id} left the guild during their help session; the cooldown role won't be removed") - return - - # Remove the cooldown role if the claimant has no other channels left - if not any(claimant.id == user_id for _, user_id in await _caches.claimants.items()): + elif not any(claimant.id == user_id for _, user_id in await _caches.claimants.items()): + # Remove the cooldown role if the claimant has no other channels left await _cooldown.remove_cooldown_role(claimant) await _message.unpin(channel) |