Discord Bot无法播放音乐

时间:2019-03-14 15:49:17

标签: python

我正试图使机器人加入vc并播放yt音乐,这会给我这个错误

  

discord.ext.commands.errors.CommandInvokeError:命令引发了异常:RuntimeError:为了使用语音,需要PyNaCl库

我已经安装了所有需要的库,唯一无法检测到的是PyNaCl

import youtube_dl
import nacl.utils

@client.command(pass_context=True)
async def join(ctx): #join
 user = ctx.message.author
 channel = user.voice_channel
 await client.join_voice_channel(channel)

@client.command(pass_context=True)
async def play(ctx,url): #play
 server = ctx.message.server
 voice_client = client.voice_client_in(server)
 player = await voice_client.create_ytdl_player(url)
 players[server.id] = player
 player.start()

0 个答案:

没有答案
相关问题