这是我的代码:
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版本v0.16中的语法,该语法不再受支持。请参阅the guide for migrating to v1,特别是Voice Changes section: