messages.UnpinAllMessages

class pyrogram.raw.functions.messages.UnpinAllMessages

Unpin all pinned messages

Details:
  • Layer: 227

  • ID: 62DD747

Parameters:
  • peer (InputPeer) – Chat where to unpin

  • top_msg_id (int 32-bit, optional) – Forum topic where to unpin

  • saved_peer_id (InputPeer, optional) – If set, must be equal to the ID of a monoforum topic, and will unpin all messages pinned in the passed monoforum topic.

Returns:

messages.AffectedHistory

TL Schema

messages.unpinAllMessages#62dd747
flags:#
peer:InputPeer
top_msg_id:flags.0?int
saved_peer_id:flags.1?InputPeer

= messages.AffectedHistory

Parameter Tree

UnpinAllMessages
├── peer → 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
├── top_msg_id → int (optional)
└── saved_peer_id → InputPeer (optional)
├── InputPeerEmpty
├── InputPeerSelf
├── InputPeerChat
│ └── chat_id → long
├── InputPeerUser
│ ├── user_id → long
│ └── access_hash → long
│ ├── 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
├── msg_id → int
└── channel_id → long

Example

await app.invoke(
    UnpinAllMessages(
        peer=await app.resolve_peer(chat_id),
        top_msg_id=0,
        saved_peer_id=await app.resolve_peer(chat_id),
    )
)