app.command("/hello", (req, ctx) -> {
List<LayoutBlock> blocks = asBlocks(
section(section -> section.text(markdownText("select the meeting option"))),
actions(actions -> actions.elements(asElements(multiUsersSelect(b -> b.actionId("users-select").placeholder(plainText("select a option"))))))
);
return ctx.ack(blocks);
});
This is my code. On /hello
command , multi user select menu should appear but instead I am getting this error /hello failed with the error "invalid_blocks"
.
I have also given users:read
permission for bot.
What could be the reason?
Update:
I was able to make it work with this code
section(section -> section.blockId("select-users").text(markdownText("*Select Users*")).accessory(multiUsersSelect(select -> select.actionId("select-user-action").placeholder(plainText("Select users that should recieve your survey")))))