diff options
author | 2020-10-19 01:15:20 +1000 | |
---|---|---|
committer | 2020-10-19 01:15:20 +1000 | |
commit | 572679094288734bbbf9bac5dc59bbe1e7dad155 (patch) | |
tree | 74c45b369d9e17a22c915b585ea1d80794342c2e | |
parent | Send response in verification if DM fails. (diff) |
Disconnect users on voiceban.
On voiceban, a users effective permissions will change to not allow speaking, however this permission isn't effective until rejoining. To ensure a voiceban is immediately in effect, the user will be disconnected from any voice channels.
-rw-r--r-- | bot/exts/moderation/infraction/infractions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/moderation/infraction/infractions.py b/bot/exts/moderation/infraction/infractions.py index 71d873667..746d4e154 100644 --- a/bot/exts/moderation/infraction/infractions.py +++ b/bot/exts/moderation/infraction/infractions.py @@ -371,6 +371,8 @@ class Infractions(InfractionScheduler, commands.Cog): if reason: reason = textwrap.shorten(reason, width=512, placeholder="...") + await user.move_to(None, reason="Disconnected from voice to apply voiceban.") + action = user.remove_roles(self._voice_verified_role, reason=reason) await self.apply_infraction(ctx, infraction, user, action) |