messages.SetHistoryTTL

class pyrogram.raw.functions.messages.SetHistoryTTL

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

Details:
  • Layer: 227

  • 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
├── 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
└── period → int

Example

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