From e347ffa336b0754406a533d5ff36fac2dba1e098 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Wed, 10 Apr 2019 02:33:19 +0200 Subject: [PATCH] Bot can join voice channel with user limit if it has move members perm (#2525) --- redbot/cogs/audio/audio.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index 1326e1c7f..15d657aaf 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -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.")