小编Mat*_*Mat的帖子

Discord 音乐机器人 VoiceClient' 对象没有属性 'create_ytdl_player'

我想编写自己的不和谐机器人,它可以播放 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)

python-3.x youtube-dl discord discord.py

1
推荐指数
1
解决办法
9310
查看次数

标签 统计

discord ×1

discord.py ×1

python-3.x ×1

youtube-dl ×1