I've tried to connect my BOT to a voice channel to do a music BOT, but I don't know why, it doesn't work. Can you help me please ? I've already install PyNaCl, and it still doesn't working...
This is the code of the command :
@bot.command()
async def join(ctx):
channel = get(ctx.guild.voice_channels, id=722012728176410694)
await channel.connect()
And here is the error that is printed :
Ignoring exception in command join:
Traceback (most recent call last):
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Maxence\Documents\Programmation\Python\Discord\Music BOT\main.py", line 44, in join
await channel.connect()
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\abc.py", line 1076, in connect
voice = VoiceClient(state=state, timeout=timeout, channel=self)
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\voice_client.py", line 91, in __init__
raise RuntimeError("PyNaCl library needed in order to use voice")
RuntimeError: PyNaCl library needed in order to use voice
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Maxence\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice
I really need help I found no answers...