add_bot_preview_media()

async Client.add_bot_preview_media()

Add a Main Mini App preview for a bot.

Usable by Users Bots
Parameters:
  • bot (int | str) – Unique identifier (int) or username (str) of the target bot.

  • lang_code (str) – ISO 639-1 language code, indicating the localization of the preview to add.

  • media (InputMedia) – The photo/video preview to add.

Returns:

BotPreviewMedia – On success, the added preview media is returned.

Example

preview = await app.add_bot_preview_media("my_bot", "en", input_media)