Link Search Menu Expand Document

Method: contacts.block

Back to methods index

Adds a peer to a blocklist, see here » for more info.

Parameters:

NameTypeDescriptionRequired
my_stories_fromBoolWhether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info.Optional
idUsername, chat ID, Update, Message or InputPeerPeerOptional

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->block(my_stories_from: $Bool, id: $InputPeer, );