Answer the question
In order to leave comments, you need to log in
Why doesn't connecting/disconnecting to the bot's Discord voice channel work?
I wanted to make a bot, the usual commands in text chats work, but connecting and disconnecting to voice channels does not work, I did not find any sensible guides.
This is what I was able to scoop out from existing guides:
@client.command(pass_context=True)
async def join(ctx):
channel= ctx.message.author.voice.channel
await channel.connect()
@client.command(pass_context=True)
async def leave(ctx):
server=ctx.message.server
voice_client=client.voice_client_in(server)
await voice_client.disconnect()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question