contacts.SetBlocked

class pyrogram.raw.functions.contacts.SetBlocked

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

Details:
  • Layer: 227

  • ID: 94C65C76

Parameters:
  • id (List of InputPeer) – Full content of the blocklist.

  • limit (int 32-bit) – Maximum number of results to return, see pagination

  • my_stories_from (bool, optional) – Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two.

Returns:

bool

TL Schema

contacts.setBlocked#94c65c76
flags:#
my_stories_from:flags.0?true
id:Vector<InputPeer>
limit:int

= Bool

Parameter Tree

SetBlocked
├── my_stories_from → true (optional)
├── id → Vector < InputPeer >
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
└── limit → int

Example

await app.invoke(
    SetBlocked(
        my_stories_from=None,
        id=[
                await app.resolve_peer(chat_id)
            ],
        limit=0,
    )
)