mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
fx
This commit is contained in:
@@ -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():
|
||||
return
|
||||
voice_channel_connection = await voice_channel.connect()
|
||||
if not voice_channel_connection:
|
||||
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")
|
||||
logger.info("Connecting to voice")
|
||||
return
|
||||
logger.info("Connected to voice")
|
||||
|
||||
|
||||
async def disconnect(ctx):
|
||||
|
||||
Reference in New Issue
Block a user