Layer 220
method Bots
messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector<InlineQueryPeerType> = messages.BotPreparedInlineMessage;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Result InputBotInlineResult The message
UserId InputUser The user to whom the web_app_send_prepared_message event event will be sent
PeerTypes Vector<InlineQueryPeerType> Types of chats where this message can be sent

Possible Errors

Code Type Description
400 RESULT_ID_INVALID One of the specified result IDs is invalid.
400 SEND_MESSAGE_GAME_INVALID An input Bot Inline Message Game can only be contained in an input Bot Inline Result Game, not in an input Bot Inline Result/input Bot Inline Result Photo/etc.
400 USER_BOT_REQUIRED This method can only be called by a bot.
400 USER_ID_INVALID The provided user ID is invalid.

Gogram Example

// MessagesSavePreparedInlineMessage - using Params struct
result, err := client.MessagesSavePreparedInlineMessage(&tg.MessagesSavePreparedInlineMessageParams{
    Result: &tg.InputBotInlineResult{},
    UserId: &tg.InputUserSelf{},

    // Optional fields:
    // PeerTypes: []tg.InlineQueryPeerType{&tg.InlineQueryPeerType{}},
})
if err != nil {
    // handle error
}
// result is *tg.MessagesBotPreparedInlineMessage