From 3ae5301a760ea6b7b1284dc371e515c9d8588505 Mon Sep 17 00:00:00 2001 From: TrustyJAID Date: Mon, 26 Oct 2020 12:22:33 -0600 Subject: [PATCH] Fix auto channel unmute still applying after bot restart (#4536) --- redbot/cogs/mutes/mutes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/mutes/mutes.py b/redbot/cogs/mutes/mutes.py index 9994ff0a4..6564a9db3 100644 --- a/redbot/cogs/mutes/mutes.py +++ b/redbot/cogs/mutes/mutes.py @@ -404,6 +404,9 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass): success = await self.channel_unmute_user( channel.guild, channel, author, member, _("Automatic unmute") ) + async with self.config.channel(channel).muted_users() as muted_users: + if str(member.id) in muted_users: + del muted_users[str(member.id)] if success["success"]: if create_case: if isinstance(channel, discord.VoiceChannel): @@ -421,9 +424,6 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass): until=None, channel=channel, ) - async with self.config.channel(channel).muted_users() as muted_users: - if str(member.id) in muted_users: - del muted_users[str(member.id)] return None else: error_msg = _(