This commit is contained in:
2024-09-19 16:55:09 +02:00
parent 73b7a4bfa4
commit dd0b679bfc
+11 -7
View File
@@ -542,16 +542,20 @@ async def connect(ctx, arg=None):
"""
if ctx and arg:
logger.info("Ctx and arg defined for connect")
voice_channel = client.get_channel(1060349757349974066)
if client.voice_clients:
voice_client = client.voice_clients[0]
if voice_client.is_connected():
logger.info("Already connected with other client")
else:
vc = None
if ctx.author.voice.channel:
vc = await ctx.author.voice.channel.connect()
else:
voice_channel = client.get_channel(1060349757349974066)
vc = await voice_channel.connect()
if not vc:
logger.error("Not possible to connect to voice")
return
voice_channel_connection = await voice_channel.connect()
if not voice_channel_connection:
logger.error("Not possible to connect to voice")
logger.info("Connecting to voice")
logger.info("Connected to voice")
async def disconnect(ctx):