Link Search Menu Expand Document

Method: contacts.setBlocked

Back to methods index

Replace the contents of an entire blocklist, see here for more info ».

Parameters:

NameTypeDescriptionRequired
my_stories_fromBoolWhether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two.Optional
idArray of Username, chat ID, Update, Message or InputPeerFull content of the blocklist.Yes
limitintMaximum number of results to return, see paginationOptional

Return type: Bool

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->contacts->setBlocked(my_stories_from: $Bool, id: [$InputPeer, $InputPeer], limit: $int, );