Fix unintended moving *between* VCs when channel muting (#5854)

This commit is contained in:
Jakub Kuczys 2022-10-03 18:11:37 +02:00 committed by GitHub
parent f02528378f
commit 1241ea165c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1711,7 +1711,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
move_channel = False
send_reason = None
if user.voice and user.voice.channel:
if user.voice and user.voice.channel == channel:
if channel.permissions_for(guild.me).move_members:
move_channel = True
else:
@ -1846,7 +1846,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
"speak": None,
}
if user.voice and user.voice.channel:
if user.voice and user.voice.channel == channel:
if channel.permissions_for(guild.me).move_members:
move_channel = True