[Audio] Allow join of full voice channel w/ 'move_members' (#1923)

This commit is contained in:
jack1142 2019-02-09 00:03:26 +01:00 committed by Twentysix
parent 5444da655a
commit 1a25d4291f

View File

@ -2252,7 +2252,7 @@ class Audio:
if channel:
in_channel = bool(server.me in channel.voice_members)
is_admin = channel.permissions_for(server.me).administrator
can_move = channel.permissions_for(server.me).move_members
if channel.user_limit == 0:
is_full = False
else:
@ -2264,7 +2264,7 @@ class Audio:
raise UnauthorizedConnect
elif channel.permissions_for(server.me).speak is False:
raise UnauthorizedSpeak
elif is_full and not is_admin and not in_channel:
elif is_full and not can_move and not in_channel:
raise ChannelUserLimit
else:
return True