I am working with slack_bolt and trying to make different responses according to static_select in block element. How to print the value from selected_option?
the block is like this
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Pick an item from the dropdown list"
},
"accessory": {
"type": "static_select",
"placeholder": {
"type": "plain_text",
"text": "Select an item",
"emoji": True
},
"options": [
{
"text": {
"type": "plain_text",
"text": "value-0",
"emoji": True
},
"value": "value-0"
}, ....
In this case, how can I print the value("value-0") I selected after I select one option?
What variables do I need to use? with blow function
@app.message("hello")
def show_event(event, say):
say(
blocks=blocks,
text="Pick a date for me to remind you"
)
@app.action("select_action")
def handle_some_action(ack, body, logger, say):
ack()
logger.info(body)
say(***"the variable to return selected value"***)