fix(commands/voice/join): check if channels correct before joining
This commit is contained in:
parent
de5d4d2793
commit
d0ddf9ee47
@ -1,3 +1,5 @@
|
|||||||
|
import disnake
|
||||||
|
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
from .utils import command_allowed
|
from .utils import command_allowed
|
||||||
@ -6,8 +8,14 @@ from .utils import command_allowed
|
|||||||
async def join(message):
|
async def join(message):
|
||||||
if message.guild.voice_client:
|
if message.guild.voice_client:
|
||||||
return await message.guild.voice_client.move_to(message.channel)
|
return await message.guild.voice_client.move_to(message.channel)
|
||||||
|
elif message.author.voice:
|
||||||
|
await message.author.voice.channel.connect()
|
||||||
|
elif isinstance(message.channel, disnake.VoiceChannel):
|
||||||
await message.channel.connect()
|
await message.channel.connect()
|
||||||
|
else:
|
||||||
|
await utils.reply(message, "you are not connected to a voice channel!")
|
||||||
|
return
|
||||||
|
|
||||||
await utils.add_check_reaction(message)
|
await utils.add_check_reaction(message)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user