'VoiceState'对象没有属性'voice_channel'

时间:2020-10-05 06:35:59

标签: discord.py-rewrite

@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'

1 个答案:

答案 0 :(得分:-1)

client.command()
async def join(ctx):
    channel = ctx.author.voice.channel
    await channel.connect()