我想编写自己的不和谐机器人,它可以播放 youtube 上的一些歌曲,但它不会创建 ydl 播放器,这是错误Command raised an exception: AttributeError: 'VoiceClient' object has no attribute 'create_ytdl_player',这是我的代码。提前致谢。
@client.command(pass_context=True)
async def s(ctx):
user=ctx.message.author
voicech = ctx.author.voice.channel
voice = await voicech.connect()
player = await voice.create_ytdl_player("some url")
player = await vc.create_ytdl_player()
player.start()
Run Code Online (Sandbox Code Playgroud)