messages.UpdatePinnedMessage

class pyrogram.raw.functions.messages.UpdatePinnedMessage

Pin a message

Details:
  • Layer: 227

  • ID: D2AAF7EC

Parameters:
  • peer (InputPeer) – The peer where to pin the message

  • id (int 32-bit) – The message to pin or unpin

  • silent (bool, optional) – Pin the message silently, without triggering a notification

  • unpin (bool, optional) – Whether the message should unpinned or pinned

  • pm_oneside (bool, optional) – Whether the message should only be pinned on the local side of a one-to-one chat

Returns:

Updates

TL Schema

messages.updatePinnedMessage#d2aaf7ec
flags:#
silent:flags.0?true
unpin:flags.1?true
pm_oneside:flags.2?true
peer:InputPeer
id:int

= Updates

Parameter Tree

UpdatePinnedMessage
├── silent → true (optional)
├── unpin → true (optional)
├── pm_oneside → true (optional)
├── 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
└── id → int

Example

await app.invoke(
    UpdatePinnedMessage(
        silent=None,
        unpin=None,
        pm_oneside=None,
        peer=await app.resolve_peer(chat_id),
        id=0,
    )
)