1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-03 00:15:27 +00:00
tgbotapi/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/AnswerWebAppQuery.kt

12 lines
388 B
Kotlin
Raw Normal View History

2022-05-04 04:50:08 +00:00
package dev.inmo.tgbotapi.webapps
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.answers.AnswerWebAppQuery
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
suspend fun TelegramBot.answerWebAppQuery(
result: InlineQueryResult
) = webApp.initDataUnsafe.queryId ?.let {
execute(AnswerWebAppQuery(it, result))
}