0

using python im tring to create a bot thta moves a user from one voice channel to another

@client.command(pass_context = True)
async def asw(ctx, member: discord.Member):
    channels = 1062106353230950430
    await member.move_to(channel=channels)

1 Answer 1

1

In discord.Member.move_to the parameter channel requires the channel Object not the id. You can get it usingdiscord.Guild.get_channel.

The code will be:

@client.command(pass_context = True)
async def asw(ctx, member: discord.Member):
    channels = ctx.guild.get_channel(1062106353230950430)
    await member.move_to(channel=channels)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.