#RuntimeError: PyNaCl library needed in order to use voice

1 messages · Page 1 of 1 (latest)

mossy vault
#
@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()```
delicate pivot
#

Do you use discord.Bot?

mossy vault
#

I use commands.Bot

delicate pivot
#

If you use commands.Bot why do you use @bot.command ?

#

also py-cord is not using interaction at the slash commands

mossy vault
#

I was using prefixed commands

mortal gorgeBOT
#

Here's the slash basic example.

compact estuary
#

also wtf is discord.interactions

#

never seen that before

delicate pivot
#

also it doesnt matter if you have py-cord or py-cord voice installed

mossy vault
#

Right I see

winged abyss
#

Because the error looks pretty clear to me