Skip to main content

bots.editPreviewMedia

Edit a main mini app preview, see here » for more info. Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.

func (c *Client) BotsEditPreviewMedia(ctx context.Context, request *BotsEditPreviewMediaRequest) (*BotPreviewMedia, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.BotsEditPreviewMedia(ctx, &tg.BotsEditPreviewMediaRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *BotPreviewMedia
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassyesThe bot that owns the Main Mini App.
LangCodestringyesISO 639-1 language code, indicating the localization of the preview to edit.
MediaInputMediaClassyesThe photo/video preview to replace, previously fetched as specified here ».
NewMediaInputMediaClassyesThe new photo/video preview, uploaded using messages.uploadMedia.

Returns

*BotPreviewMedia

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References