@bot.command(name="c1", description="Starts playing music in the music channel.")
async def xqc1(ctx: discord.interactions.Interaction):
voice_channel = ctx.author.voice.channel
voice_client = await voice_channel.connect()
source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio('c1.mp3'))
voice_client.play(source)
while voice_client.is_playing():
await asyncio.sleep(1)
await voice_client.disconnect()```
#RuntimeError: PyNaCl library needed in order to use voice
1 messages · Page 1 of 1 (latest)
Do you use discord.Bot?
I use commands.Bot
If you use commands.Bot why do you use @bot.command ?
also py-cord is not using interaction at the slash commands
I was using prefixed commands
Here's the slash basic example.
also it doesnt matter if you have py-cord or py-cord voice installed
Right I see
What’s ur issue ?
Because the error looks pretty clear to me