stories.TogglePinned

class pyrogram.raw.functions.stories.TogglePinned

Pin or unpin one or more stories

Details:
  • Layer: 223

  • ID: 9A75A1EF

Parameters:
  • peer (InputPeer) – Peer where to pin or unpin stories

  • id (List of int 32-bit) – IDs of stories to pin or unpin

  • pinned (bool) – Whether to pin or unpin the stories

Returns:

List of int 32-bit

TL Schema

stories.togglePinned#9a75a1ef
peer:InputPeer
id:Vector<int>
pinned:Bool

= Vector<int>

Parameter Tree

TogglePinned
├── 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
├── idVector < int >
└── pinnedBool

Example

await app.invoke(
    TogglePinned(
        peer=await app.resolve_peer(chat_id),
        id=[0],
        pinned=True,
    )
)