mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -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:
|
if channel:
|
||||||
in_channel = bool(server.me in channel.voice_members)
|
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:
|
if channel.user_limit == 0:
|
||||||
is_full = False
|
is_full = False
|
||||||
else:
|
else:
|
||||||
@ -2264,7 +2264,7 @@ class Audio:
|
|||||||
raise UnauthorizedConnect
|
raise UnauthorizedConnect
|
||||||
elif channel.permissions_for(server.me).speak is False:
|
elif channel.permissions_for(server.me).speak is False:
|
||||||
raise UnauthorizedSpeak
|
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
|
raise ChannelUserLimit
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user