#Select menu and Roles

1 messages · Page 1 of 1 (latest)

gleaming tartan
#

You have an error in the code...
Also do you get any errors?

#

I think the select_callback functions is supposed to just be called callback

#

Also interaction.response.user doesn't seem like a valid option. Use await user.add_roles() and await interaction.response.send() instead

#

Or does that work already?

odd moatBOT
#

An HTTP exception has occured: 400 HTTPException: Invalid Form Body
In data.components.0.components.0.url: Not a well formed URL.

#

Here's the context menus example.

gleaming tartan
#

No

#

Uhm did you already look in the docs for the arguments the callback can have?

#

Because the select argument doesn't seem like it's needed there. Is should already be in self

#

Yes

wet oak
#

isn’t user.guild.get_role(id) needed? or does the raw id work

gleaming tartan
wet oak
#

yeah you’re right

gleaming tartan
#

I'm currently on my phone and can't help any further right now. I'll look into it later when I'm on my pc.

wet oak
#

I was wrong lol

gleaming tartan
#

In the meantime you could look through the docs and the guide

young lion
#

interaction.user.add_roles(role)

#

There is also an attribute emoji so it doesn't need to go in label

#

You need to pass a role not a role ID

#

Object

#

Yes

obtuse saddle
#

@lean minnow please /close if your problem is solved