#Give Role on Button clicked

1 messages · Page 1 of 1 (latest)

sudden crypt
#

why did you add user to the button callback?

#

why?

#

its all at interaction

drifting swan
#

You can't randomly add arguments to callbacks

#

They're predefined things.

#

As zervy said, interaction contains everything, that includes the user that clicked the button

sudden crypt
#

.rtfm discord.Interaction

sudden crypt
#

take a look at the first link

drifting swan
#

no

#

You're supposed to refer to the user

#

interaction has a user attribute which is a discord.Member object that contains the add_roles method you want.

#

Sounds like you don't know OOP.