Evan R.
07/16/2020, 11:49 AMval response = slack.methods(token).chatPostMessage { req -> req
.channel("C1234567")
.blocks {
section {
markdownText("*Please select a restaurant:*")
}
divider()
actions {
button {
text("Farmhouse", emoji = true)
value("v1")
}
button {
text("Kin Khao", emoji = true)
value("v2")
}
}
}
}
This DSL works for Slack App Home and Modals as well. You can read more about it and how to install it on Slack’s documentation site: https://slack.dev/java-slack-sdk/guides/composing-messages#block-kit-kotlin-dsl