使用youtube_dl的Discord.py属性错误?

问题描述 投票:0回答:1

这是我的代码:

    channel = client.get_channel(myid) 
    vc = await channel.connect()
    player = await vc.create_ytdl_player(url)
    player.volume = 0.5
    player.start()

我得到:

AttributeError: 'VoiceClient' object has no attribute 'create_ytdl_player'
discord.py youtube-dl
1个回答
0
投票

您正在使用Discord.py版本v0.16中的语法,该语法不再受支持。请参阅the guide for migrating to v1,特别是Voice Changes section

© www.soinside.com 2019 - 2024. All rights reserved.