Skip to main content

bots.reorderPreviewMedias

Reorder a main mini app previews, 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) BotsReorderPreviewMedias(ctx context.Context, request *BotsReorderPreviewMediasRequest) (bool, error)

Calling this method

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

res, err := api.BotsReorderPreviewMedias(ctx, &tg.BotsReorderPreviewMediasRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassyesThe bot that owns the Main Mini App.
LangCodestringyesISO 639-1 language code, indicating the localization of the previews to reorder.
Order[]InputMediaClassyesNew order of the previews.

Returns

bool

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References