ensure bot is out of VC before using sfx so it queues properly

This commit is contained in:
brandons209 2020-06-28 00:39:51 -04:00
parent 3b2fadd14e
commit ef236fa964

View file

@ -281,10 +281,16 @@ class SFX(commands.Cog):
"""
Play a say sound!
"""
# TODO: cost manager receipt integration
if not ctx.author.voice or ctx.author.voice.channel is None:
await ctx.send(error("Connect to a voice channel to use this command."))
return
# TODO: create my own queue to fix this issue
if ctx.guild.me.voice and ctx.guild.me.voice.channel != ctx.author.voice.channel:
await ctx.send(error("Please wait for the bot to disconnect from it's VC before using the command."))
return
name = name.lower()
saysounds = await self.config.guild(ctx.guild).saysounds()
audio_cog = self.bot.get_cog("Audio")