answerWebAppQuery()
Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
parameters
| parameter | type | required | description |
|---|---|---|---|
web_app_query_id | string | required | Unique identifier for the query to be answered |
result | InlineQueryResult | required | A JSON-serialized object describing the message to be sent |
returns
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { AnswerWebAppQueryParams, SentWebAppMessage } from "@yaebal/types";
await bot.api.call<SentWebAppMessage>("answerWebAppQuery", {
web_app_query_id: "...",
result: {} /* InlineQueryResult */,
} satisfies AnswerWebAppQueryParams);official Bot API docs: https://core.telegram.org/bots/api/#answerwebappquery