Layer 224
method Users Business
bots.addPreviewMedia#17aeb75a bot:InputUser lang_code:string media:InputMedia = BotPreviewMedia;

Parameters

Name Type Description
Bot InputUser The bot that owns the Main Mini App.
LangCode string ISO 639-1 language code, indicating the localization of the preview to add.
Media InputMedia The photo/video preview, uploaded using messages. upload Media.

Returns

BotPreviewMedia

Gogram Example

// BotsAddPreviewMedia - positional arguments
result, err := client.BotsAddPreviewMedia(&tg.InputUserSelf{}, "Hello, World!", &tg.InputMediaPhoto{ID: &tg.InputPhoto{ID: int64(5678901234567890), AccessHash: int64(1234567890123456), FileReference: []byte{0x01}}})
if err != nil {
    // handle error
}
// result is *tg.BotPreviewMedia

Possible Errors

Code Type Description
400 BOT_INVALID This is not a valid bot.