bots.getPreviewInfo
Bot owners only, fetch main mini app preview information, see here » for more info. Note: technically non-owners may also invoke this method, but it will always behave exactly as bots.getPreviewMedias, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.getPreviewMedias if you're not the owner of the bot.
func (c *Client) BotsGetPreviewInfo(ctx context.Context, request *BotsGetPreviewInfoRequest) (*BotsPreviewInfo, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.BotsGetPreviewInfo(ctx, &tg.BotsGetPreviewInfoRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *BotsPreviewInfo
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Bot | InputUserClass | yes | The bot that owns the Main Mini App. |
LangCode | string | yes | Fetch previews for the specified ISO 639-1 language code. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.getPreviewInfo#423ab3ad