1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-02 06:39:41 +00:00

TelegramBot#answerWebAppQuery

This commit is contained in:
2022-05-04 10:50:08 +06:00
parent bd23d3fbdb
commit 7ff6412ec5
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
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))
}