Method: 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.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
bot | Username, chat ID, Update, Message or InputUser | The bot that owns the Main Mini App. | Optional |
lang_code | string | ISO 639-1 language code, indicating the localization of the preview to edit. | Optional |
media | MessageMedia, Update, Message or InputMedia | The photo/video preview to replace, previously fetched as specified here ». | Optional |
new_media | MessageMedia, Update, Message or InputMedia | The new photo/video preview, uploaded using messages.uploadMedia. | Optional |
Return type: BotPreviewMedia
Can userbots use this method: YES
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$BotPreviewMedia = $MadelineProto->bots->editPreviewMedia(bot: $InputUser, lang_code: 'string', media: $InputMedia, new_media: $InputMedia, );