contacts.SetBlocked

class pyrogram.raw.functions.contacts.SetBlocked

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

Details:
  • Layer: 223

  • 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_fromtrue (optional)
├── idVector < InputPeer >
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
└── limitint

Example

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