Bot can join voice channel with user limit if it has move members perm (#2525)

This commit is contained in:
jack1142 2019-04-10 02:33:19 +02:00 committed by Will
parent c85af62401
commit e347ffa336

View File

@ -1027,8 +1027,10 @@ class Audio(commands.Cog):
return await self._embed_msg(ctx, _("That URL is not allowed."))
if not self._player_check(ctx):
try:
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self._userlimit(
ctx.author.voice.channel
if (
not ctx.author.voice.channel.permissions_for(ctx.me).connect
or not ctx.author.voice.channel.permissions_for(ctx.me).move_members
and self._userlimit(ctx.author.voice.channel)
):
return await self._embed_msg(
ctx, _("I don't have permission to connect to your channel.")
@ -1952,8 +1954,10 @@ class Audio(commands.Cog):
return False
if not self._player_check(ctx):
try:
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self._userlimit(
ctx.author.voice.channel
if (
not ctx.author.voice.channel.permissions_for(ctx.me).connect
or not ctx.author.voice.channel.permissions_for(ctx.me).move_members
and self._userlimit(ctx.author.voice.channel)
):
return await self._embed_msg(
ctx, _("I don't have permission to connect to your channel.")
@ -2406,8 +2410,10 @@ class Audio(commands.Cog):
if not self._player_check(ctx):
try:
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self._userlimit(
ctx.author.voice.channel
if (
not ctx.author.voice.channel.permissions_for(ctx.me).connect
or not ctx.author.voice.channel.permissions_for(ctx.me).move_members
and self._userlimit(ctx.author.voice.channel)
):
return await self._embed_msg(
ctx, _("I don't have permission to connect to your channel.")