aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2020-11-24 20:58:58 +0300
committerGravatar Hassan Abouelela <[email protected]>2020-11-24 20:58:58 +0300
commite50bc5f507fe62afc534d286c5fc380d72c75b36 (patch)
tree96ce2c5102db4ebc311f7ac3a656837dd6a9b144
parentMoves VoiceChat Sync Out of Overwrites Function (diff)
Move VoiceChat Sync To _unsilence
Moves the call to voice chat sync from _unsilence_wrapper to _unsilence. Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r--bot/exts/moderation/silence.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/exts/moderation/silence.py b/bot/exts/moderation/silence.py
index 64ffaa347..fd051a0ff 100644
--- a/bot/exts/moderation/silence.py
+++ b/bot/exts/moderation/silence.py
@@ -219,10 +219,6 @@ class Silence(commands.Cog):
await self.send_message(MSG_UNSILENCE_FAIL, msg_channel, channel)
else:
- # Send success message to muted channel or voice chat channel, and invocation channel
- if isinstance(channel, VoiceChannel):
- await self._force_voice_sync(channel)
-
await self.send_message(MSG_UNSILENCE_SUCCESS, msg_channel, channel, True)
async def _set_silence_overwrites(self, channel: Union[TextChannel, VoiceChannel], kick: bool = False) -> bool:
@@ -345,6 +341,8 @@ class Silence(commands.Cog):
await channel.set_permissions(self._verified_msg_role, overwrite=overwrite)
else:
await channel.set_permissions(self._verified_voice_role, overwrite=overwrite)
+ await self._force_voice_sync(channel)
+
log.info(f"Unsilenced channel #{channel} ({channel.id}).")
self.scheduler.cancel(channel.id)