#List of options and buttons

1 messages · Page 1 of 1 (latest)

marble arrow
#

in select_callback, select.values returns a list of all option values selected

#

since your SelectOptions don't have a value set, it defaults to the label text instead

summer garden
#

yea but i want to select more than one value, and do the thing when i press the button

marble arrow
#

it's a list of values so you can select multiple perfectly fine

#

as for accessing them from the button...

#

in button_callback, you could try either self.select_callback.values or self.children[0].values

#

one of those should work

summer garden
#

1 - open the list
2- select 2 options in it
3- click out the list
when i do this, select_callback is called and send me an error

#

there is a way to have the list and no callback?

#

self.select_callback.values worked perfectly

marble arrow
#

you could send a generic message with interaction.response.send_message and make it ephemeral, or use interaction.response.edit_message to change some content

summer garden
#

oh ok