Good morning everyone! As the author of this featu...
# feed
e
Good morning everyone! As the author of this feature, I’m excited to announce that the Java Slack SDK version 1.1.0 just got released and with it a Kotlin DSL for the Slack Block Kit! This allows you to richly format your slack messages with a native Kotlin DSL like so:
Copy code
val 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
👍 6
😍 2
💯 14