fun helpMessage()

in kotlin/add-interactive-ui-to-messages/src/main/kotlin/org/remindme/CommandHelp.kt [10:25]


fun helpMessage(): ChatMessage {
    return message {
        MessageOutline(
            icon = ApiIcon("checkbox-checked"),
            text = "Remind me bot help"
        )
        section {
            text("List of available commands", MessageStyle.PRIMARY)
            fields {
                supportedCommands.forEach {
                    field(it.name, it.info)
                }
            }
        }
    }
}