我尝试了很多事情,并且在Google上搜索了很多,但仍然不知道如何使用discord.py-rewrite将音乐播放到语音通道。
我的代码:
#playing music from a link
async def play_link(ctx,url):
#joining user's voice channel
await join_auth(ctx)
#playing music
voice = client.voice_client_in(ctx.guild)
player = await voice.create_ytdl_player(url)
player.start()
它会引发此错误:
File "C:\Users\Eugene\Desktop\Discord bot\Auto_music.py", line 207, in play_link
voice = client.voice_client_in(ctx.guild)
AttributeError: 'Bot' object has no attribute 'voice_client_in'