1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-24 19:18:44 +00:00

TelegramBot#answerWebAppQuery

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

View File

@ -4,6 +4,8 @@
* `BehaviourBuilder FSM`:
* Hotfixes
* `WebApps`:
* New extension `TelegramBot#answerWebAppQuery`
## 0.38.19

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))
}