【发布时间】:2019-08-24 01:48:40
【问题描述】:
我正在尝试为我的机器人创建一个“.join”命令,但我尝试过的所有方法都不起作用并且我尝试了很多方法
这是我尝试过的,我也尝试过其他几种方式:
@client.command(pass_context=True)
async def join(ctx):
channel=ctx.message.author.voice.VoiceChannel
await client.join_VoiceChannel(channel)
它给出了这个错误:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'VoiceState' object has no attribute 'VoiceChannel'
【问题讨论】:
-
this answer 适合您吗?我相信你打电话给 author.voice.VoiceChannel 应该只是打电话给 author.VoiceChannel
-
我现在收到此错误
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'voice_channel'和author.VoiceChannel相同
标签: python-3.x discord.py discord.py-rewrite