diff options
| author | 2020-06-06 21:29:33 +0200 | |
|---|---|---|
| committer | 2020-06-06 21:29:33 +0200 | |
| commit | 6e34de6397e6ab7d23c6e6abb74a2156375b2c2d (patch) | |
| tree | 7f129642b29d89f1950b94bf7cc230a7c13b9ab4 | |
| parent | Do not await self.schedule_task (diff) | |
Move cancel_task before notifier.remove_channel
- as sugested notifier.remove_channel and muted_channels.discard should be together
| -rw-r--r-- | bot/cogs/moderation/silence.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py index 13f84009f..d5b9621d2 100644 --- a/bot/cogs/moderation/silence.py +++ b/bot/cogs/moderation/silence.py @@ -161,8 +161,8 @@ class Silence(Scheduler, commands.Cog): if current_overwrite.send_messages is False: await channel.set_permissions(self._verified_role, **dict(current_overwrite, send_messages=None)) log.info(f"Unsilenced channel #{channel} ({channel.id}).") - self.notifier.remove_channel(channel) self.cancel_task(channel.id) + self.notifier.remove_channel(channel) self.muted_channels.discard(channel) return True log.info(f"Tried to unsilence channel #{channel} ({channel.id}) but the channel was not silenced.") |