the piece of code this is about:
@bot.slash_command(name="join")
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()
@bot.slash_command(name="leave")
async def leave(ctx):
await ctx.voice_client.disconnect()
The error message:
Traceback (most recent call last):
File "C:\Users\Travm\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 127, in wrapped
ret = await coro(arg)
File "C:\Users\Travm\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 911, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\Travm\Desktop\hikari\hikaricomd.py", line 58, in join
await channel.connect()
File "C:\Users\Travm\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\abc.py", line 1830, in connect
voice = cls(client, self)
raise RuntimeError("PyNaCl library needed in order to use voice")
RuntimeError: PyNaCl library needed in order to use voice
Can someone please help me?