mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-25 10:07:14 +00:00
TelegramBot#answerWebAppQuery
This commit is contained in:
parent
bd23d3fbdb
commit
7ff6412ec5
@ -4,6 +4,8 @@
|
||||
|
||||
* `BehaviourBuilder FSM`:
|
||||
* Hotfixes
|
||||
* `WebApps`:
|
||||
* New extension `TelegramBot#answerWebAppQuery`
|
||||
|
||||
## 0.38.19
|
||||
|
||||
|
@ -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))
|
||||
}
|
Loading…
Reference in New Issue
Block a user