Link Search Menu Expand Document

Method: updates.getChannelDifference

Back to methods index

Warning: this is a low-level, complex method that must never be used directly.

The event handler provides a high-level abstraction that must be used instead of this method to fetch updates. If you want to fetch all users of a bot using a bot token, use getDialogIds or the high-level broadcast API, instead.

You cannot use this method directly, please use the event handler, instead.

Parameters:

NameTypeDescriptionRequired
forceBoolSet to true to skip some possibly unneeded updates and reduce server-side loadOptional
channelUsername, chat ID, Update, Message or InputChannelThe channelOptional
filterChannelMessagesFilterMesssage filterOptional
ptsintPersistent timestamp (see updates)Optional
limitintHow many updates to fetch, max 100000
Ordinary (non-bot) users are supposed to pass 10-100
Optional

Return type: updates.ChannelDifference

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

$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(force: $Bool, channel: $InputChannel, filter: $ChannelMessagesFilter, pts: $int, limit: $int, );