mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-03 00:15:27 +00:00
12 lines
388 B
Kotlin
12 lines
388 B
Kotlin
|
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))
|
||
|
}
|