messages.SetHistoryTTL

class pyrogram.raw.functions.messages.SetHistoryTTL

Set maximum Time-To-Live of all messages in the specified chat

Details:
  • Layer: 223

  • ID: B80E5FE4

Parameters:
  • peer (InputPeer) – The dialog

  • period (int 32-bit) – Automatically delete all messages sent in the chat after this many seconds

Returns:

Updates

TL Schema

messages.setHistoryTTL#b80e5fe4
peer:InputPeer
period:int

= Updates

Parameter Tree

SetHistoryTTL
├── 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
└── periodint

Example

await app.invoke(
    SetHistoryTTL(
        peer=await app.resolve_peer(chat_id),
        period=0,
    )
)