@client.command(pass_context=True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
在此命令中,当我运行它并键入join时,它不会加入语音通道,它说'VoiceState'对象没有属性'voice_channel'
答案 0 :(得分:-1)
client.command()
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()