【发布时间】:2018-12-09 09:36:14
【问题描述】:
我刚开始用 discord.py 编写一个不和谐机器人,一切都很完美。 除了一件事:我不能让机器人播放音乐。
这是我的代码:
@client.command(pass_context=True)
async def yt(ctx, url):
author = ctx.message.author
voice_channel = author.voice_channel
vc = await client.join_voice_channel(voice_channel)
player = await vc.create_ytdl_player(url)
player.start()
我的错误:
discord.ext.commands.errors.CommandInvokeError:
Command raised an exception:
OpusNotLoaded:
为什么会这样?
【问题讨论】:
标签: python discord.py