messages.UpdatePinnedMessage

class pyrogram.raw.functions.messages.UpdatePinnedMessage

Pin a message

Details:
  • Layer: 223

  • 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
├── silenttrue (optional)
├── unpintrue (optional)
├── pm_onesidetrue (optional)
├── peerInputPeer
│ ├── 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
└── idint

Example

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