From a0f34bbbd9612ad9829ae717271c3b5fae545354 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Wed, 26 Jun 2019 17:48:06 -0700 Subject: [PATCH] [Audio] Move DJ role check in [p]summon (#2799) --- redbot/cogs/audio/audio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index b866793a3..884fece62 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -3511,6 +3511,9 @@ class Audio(commands.Cog): async def summon(self, ctx): """Summon the bot to a voice channel.""" dj_enabled = await self.config.guild(ctx.guild).dj_enabled() + if dj_enabled: + if not await self._can_instaskip(ctx, ctx.author): + return await self._embed_msg(ctx, _("You need the DJ role to summon the bot.")) try: if ( not ctx.author.voice.channel.permissions_for(ctx.me).connect @@ -3535,9 +3538,6 @@ class Audio(commands.Cog): return await self._embed_msg( ctx, _("Connection to Lavalink has not yet been established.") ) - if dj_enabled: - if not await self._can_instaskip(ctx, ctx.author): - return await self._embed_msg(ctx, _("You need the DJ role to summon the bot.")) @commands.command() @commands.guild_only()