Python 3.x 我不能做python机器人,语音聊天 @client.command(pass\u context=True) 异步def联接(ctx): 频道=ctx.message.author.voice.voice\u频道 等待客户。加入语音频道(频道)

Python 3.x 我不能做python机器人,语音聊天 @client.command(pass\u context=True) 异步def联接(ctx): 频道=ctx.message.author.voice.voice\u频道 等待客户。加入语音频道(频道),python-3.x,discord,discord.py,bots,Python 3.x,Discord,Discord.py,Bots,我有这样的反应 raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'voice_channel' 试试这个: @client.command() 异步def联接(ctx): 语音频道=ctx.author.voice.

我有这样的反应

raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'voice_channel'
试试这个:

@client.command()
异步def联接(ctx):
语音频道=ctx.author.voice.channel
vc=等待语音信道。连接()

@Desperat Studio为您完成了这项工作?