Available methods

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

parametertyperequireddescription
web_app_query_idstringrequiredUnique identifier for the query to be answered
resultInlineQueryResultrequiredA JSON-serialized object describing the message to be sent

returns

SentWebAppMessage

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { AnswerWebAppQueryParams, SentWebAppMessage } from "@yaebal/types";

await bot.api.call<SentWebAppMessage>("answerWebAppQuery", {
  web_app_query_id: "...",
  result: {} /* InlineQueryResult */,
} satisfies AnswerWebAppQueryParams);