我有这个问题:
discord.ext.commands.errors.CommandInvokeError:命令引发异常:需要RuntimeError: PyNaCl库才能使用语音
这是我的代码:
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = '.')
@client.event
async def on_ready():
print('Pronto!')
@client.command()
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()
@client.command()
async def leave(ctx):
await ctx.voice_client.disconnect()
client.run(TOKEN)但是我已经安装了PyNaCl,我应该怎么做?

发布于 2021-02-04 09:56:43
您需要安装discord.py的voice版本我们通过执行以下操作来完成此操作:
pip install discord.py[voice]这将安装discord.py语音版,它有所有需要的软件包以及它们应该如何来:)
https://stackoverflow.com/questions/66037666
复制相似问题