#button to only work for the command creator

1 messages · Page 1 of 1 (latest)

glass spire
#

compare inter.author == inter.message.interaction.author

#

disnake.Message is just a class to hold data for a specific message, you cant use it like that

#

it wouldnt make sense since how would it know what message you mean

violet ingot
glass spire
#

I assumed this code was a MessageInteraction

violet ingot
glass spire
#

you cant restrict a button to only be interacted with by a specific person when you send it

#

youll have to do the check when the button is clicked

violet ingot
#

i want to make it only work with the person who ran the command

glass spire
#

yea, do that check when the button is clicked

violet ingot
violet ingot
glass spire
#

where are you listening for the button click, either a listener or a callback

violet ingot
#

that worked

#

Why can't I do the same above?

lethal oyster
#

Because a listener function or proper callback would be cleaner

violet ingot
violet ingot
#

I changed the system