savePreparedInlineMessage()
Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | Unique identifier of the target user that can use the prepared message |
result | InlineQueryResult | required | A JSON-serialized object describing the message to be sent |
allow_user_chats | boolean | optional | Pass True if the message can be sent to private chats with users |
allow_bot_chats | boolean | optional | Pass True if the message can be sent to private chats with bots |
allow_group_chats | boolean | optional | Pass True if the message can be sent to group and supergroup chats |
allow_channel_chats | boolean | optional | Pass True if the message can be sent to channel chats |
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 { PreparedInlineMessage, SavePreparedInlineMessageParams } from "@yaebal/types";
await bot.api.call<PreparedInlineMessage>("savePreparedInlineMessage", {
user_id: 123456789,
result: {} /* InlineQueryResult */,
} satisfies SavePreparedInlineMessageParams);context shortcut
also available as ctx.savePreparedInlineMessage() on
16
context types — see @yaebal/contexts.
/** Stores a message that can be sent by a user of a Mini App. Returns a [PreparedInlineMessage](https://core.telegram.org/bots/api/#preparedinlinemessage) object. */
ctx.savePreparedInlineMessage(params: Omit<SavePreparedInlineMessageParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#savepreparedinlinemessage