Discord.py move_to

Discord.py move_to

我想做一个 dc 机器人,我想通过提及用户将成员踢出语音频道

@client.command()
async def kick(ctx):
    victim = ctx.message.mentions[0]
    await move_to(victim,none)

我使用此代码,但它不起作用,它说“'Bot' 对象没有属性 'move_members'” 我该如何解决?

您可以通过 edit 将他们的 vocie_channel 更改为 None 将成员从语音中移除。我也在使用转换器来获取成员:

@client.command()
async def kick(ctx, member: discord.Member):
    await member.edit(voice_channel=None)