stories.TogglePinned

class pyrogram.raw.functions.stories.TogglePinned

Pin or unpin one or more stories

Details:
  • Layer: 227

  • 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
├── 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 → Vector < int >
└── pinned → Bool

Example

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