mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Audio] Move DJ role check in [p]summon (#2799)
This commit is contained in:
parent
49819a2eeb
commit
a0f34bbbd9
@ -3511,6 +3511,9 @@ class Audio(commands.Cog):
|
|||||||
async def summon(self, ctx):
|
async def summon(self, ctx):
|
||||||
"""Summon the bot to a voice channel."""
|
"""Summon the bot to a voice channel."""
|
||||||
dj_enabled = await self.config.guild(ctx.guild).dj_enabled()
|
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:
|
try:
|
||||||
if (
|
if (
|
||||||
not ctx.author.voice.channel.permissions_for(ctx.me).connect
|
not ctx.author.voice.channel.permissions_for(ctx.me).connect
|
||||||
@ -3535,9 +3538,6 @@ class Audio(commands.Cog):
|
|||||||
return await self._embed_msg(
|
return await self._embed_msg(
|
||||||
ctx, _("Connection to Lavalink has not yet been established.")
|
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.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user