mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 15:52:10 +00:00
fx
This commit is contained in:
@@ -542,16 +542,20 @@ async def connect(ctx, arg=None):
|
|||||||
"""
|
"""
|
||||||
if ctx and arg:
|
if ctx and arg:
|
||||||
logger.info("Ctx and arg defined for connect")
|
logger.info("Ctx and arg defined for connect")
|
||||||
voice_channel = client.get_channel(1060349757349974066)
|
|
||||||
|
|
||||||
if client.voice_clients:
|
if client.voice_clients:
|
||||||
voice_client = client.voice_clients[0]
|
logger.info("Already connected with other client")
|
||||||
if voice_client.is_connected():
|
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
|
return
|
||||||
voice_channel_connection = await voice_channel.connect()
|
logger.info("Connected to voice")
|
||||||
if not voice_channel_connection:
|
|
||||||
logger.error("Not possible to connect to voice")
|
|
||||||
logger.info("Connecting to voice")
|
|
||||||
|
|
||||||
|
|
||||||
async def disconnect(ctx):
|
async def disconnect(ctx):
|
||||||
|
|||||||
Reference in New Issue
Block a user