savePreparedInlineMessage

Returns: PreparedInlineMessage

class litegram.methods.save_prepared_inline_message.SavePreparedInlineMessage(*, user_id: int, result: InlineQueryResultUnion, allow_user_chats: bool | None = None, allow_bot_chats: bool | None = None, allow_group_chats: bool | None = None, allow_channel_chats: bool | None = None, **extra_data: Any)[source]

Stores a message that can be sent by a user of a Mini App. Returns a litegram.types.prepared_inline_message.PreparedInlineMessage object.

Source: https://core.telegram.org/bots/api#savepreparedinlinemessage

user_id: int

Unique identifier of the target user that can use the prepared message

result: InlineQueryResultUnion

A JSON-serialized object describing the message to be sent

allow_user_chats: bool | None

Pass True if the message can be sent to private chats with users

allow_bot_chats: bool | None

Pass True if the message can be sent to private chats with bots

allow_group_chats: bool | None

Pass True if the message can be sent to group and supergroup chats

allow_channel_chats: bool | None

Pass True if the message can be sent to channel chats

Usage

As bot method

result: PreparedInlineMessage = await bot.save_prepared_inline_message(...)

Method as object

Imports:

  • from litegram.methods.save_prepared_inline_message import SavePreparedInlineMessage

  • alias: from litegram.methods import SavePreparedInlineMessage

With specific bot

result: PreparedInlineMessage = await bot(SavePreparedInlineMessage(...))

As reply into Webhook in handler

return SavePreparedInlineMessage(...)