savePreparedInlineMessage¶
Returns: PreparedInlineMessage
- class aiogram.methods.save_prepared_inline_message.SavePreparedInlineMessage(*, user_id: int, result: InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice, 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
aiogram.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: InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice¶
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
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- 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 aiogram.methods.save_prepared_inline_message import SavePreparedInlineMessage
alias:
from aiogram.methods import SavePreparedInlineMessage
With specific bot¶
result: PreparedInlineMessage = await bot(SavePreparedInlineMessage(...))
As reply into Webhook in handler¶
return SavePreparedInlineMessage(...)