mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-02 17:55:35 +01:00
1.7 KiB
1.7 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
contacts.setBlocked | Replace the contents of an entire [blocklist, see here for more info »](https://core.telegram.org/api/block). | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/contacts_setBlocked.html |
Method: contacts.setBlocked
Replace the contents of an entire blocklist, see here for more info ».
Parameters:
Name | Type | Description | Required |
---|---|---|---|
my_stories_from | Bool | Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two. | Optional |
id | Array of Username, chat ID, Update, Message or InputPeer | Full content of the blocklist. | Yes |
limit | int | Maximum number of results to return, see pagination | Optional |
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, );