Link Search Menu Expand Document

Method: bots.deletePreviewMedia

Back to methods index

Delete 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:

NameTypeDescriptionRequired
botUsername, chat ID, Update, Message or InputUserThe bot that owns the Main Mini App.Optional
lang_codestringISO 639-1 language code, indicating the localization of the preview to delete.Optional
mediaArray of MessageMedia, Update, Message or InputMediaThe photo/video preview to delete, previously fetched as specified here ».Yes

Return type: Bool

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();

$Bool = $MadelineProto->bots->deletePreviewMedia(bot: $InputUser, lang_code: 'string', media: [$InputMedia, $InputMedia], );