From 71a047f8675f1983f233099d882d2812909da88e Mon Sep 17 00:00:00 2001 From: akkkihi Date: Tue, 3 May 2022 17:55:08 +0400 Subject: [PATCH] sendData does not work with inlineKeyboard --- WebApp/src/jvmMain/kotlin/WebAppServer.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/WebApp/src/jvmMain/kotlin/WebAppServer.kt b/WebApp/src/jvmMain/kotlin/WebAppServer.kt index bbb75a7..bd05342 100644 --- a/WebApp/src/jvmMain/kotlin/WebAppServer.kt +++ b/WebApp/src/jvmMain/kotlin/WebAppServer.kt @@ -5,11 +5,9 @@ import dev.inmo.tgbotapi.extensions.api.send.* import dev.inmo.tgbotapi.extensions.behaviour_builder.* import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.* import dev.inmo.tgbotapi.extensions.utils.types.buttons.* -import io.ktor.application.call -import io.ktor.http.content.files -import io.ktor.http.content.static -import io.ktor.routing.get -import io.ktor.routing.routing +import dev.inmo.tgbotapi.types.webapps.WebAppInfo +import io.ktor.http.content.* +import io.ktor.routing.* import io.ktor.server.tomcat.Tomcat import kotlinx.coroutines.Dispatchers import java.io.File @@ -45,12 +43,13 @@ suspend fun main(vararg args: String) { onCommand("start") { reply( it, - "Button:", - replyMarkup = inlineKeyboard { + "Button", + replyMarkup = replyKeyboard { row { - webAppButton("Open", args[1]) + webAppButton("Open WebApp", WebAppInfo(args[1])) } } + ) } allUpdatesFlow.subscribeSafelyWithoutExceptions(this) {