contacts.Block
- class pyrogram.raw.functions.contacts.Block
Adds a peer to a blocklist, see here » for more info.
- Details:
Layer:
223ID:
2E2E8734
- Parameters:
id (
InputPeer) – Peermy_stories_from (
bool, optional) – Whether 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.
- Returns:
bool
TL Schema
contacts.block#2e2e8734
flags:#
my_stories_from:flags.0?true
id:InputPeer
= Bool
Parameter Tree
Block
├── my_stories_from →
true (optional)└── id →
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├── msg_id →
int└── channel_id →
longExample
await app.invoke(
Block(
my_stories_from=None,
id=await app.resolve_peer(chat_id),
)
)