mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Audio] Allow join of full voice channel w/ 'move_members' (#1923)
This commit is contained in:
parent
5444da655a
commit
1a25d4291f
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user