I'd like to make a dc bot, and I want to kick members from voice channel by mention the user
@client.command()
async def kick(ctx):
victim = ctx.message.mentions[0]
await move_to(victim,none)
I use this code, but it don't work, it says "'Bot' object has no attribute 'move_members'" How should I solve this?
You can eject a member from voice by edit
ing their vocie_channel
to None
. I am also using a converter to get the member:
@client.command()
async def kick(ctx, member: discord.Member):
await member.edit(voice_channel=None)