Link Search Menu Expand Document

Method: updates.getDifference

Back to methods index

You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates

Parameters:

NameTypeDescriptionRequired
ptsintPTS, see updates.Optional
pts_total_limitintFor fast updating: if provided and pts + pts_total_limit < remote pts, updates.differenceTooLong will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000
Optional
dateintdate, see updates.Optional
qtsintQTS, see updates.Optional

Return type: updates.Difference

Can bots use this method: YES

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

// PHP 8+ syntax, use an array on PHP 7.
$updates_Difference = $MadelineProto->updates->getDifference(pts: int, pts_total_limit: int, date: int, qts: int, );