messages.DeleteSavedHistory

class pyrogram.raw.functions.messages.DeleteSavedHistory

Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».

Details:
  • Layer: 223

  • ID: 4DC5085F

Parameters:
  • peer (InputPeer) – Peer, whose messages will be deleted from saved messages », or the ID of the topic.

  • max_id (int 32-bit) – Maximum ID of message to delete

  • parent_peer (InputPeer, optional) – If set, affects the messages of the passed monoforum topic », otherwise affects saved messages ».

  • min_date (int 32-bit, optional) – Delete all messages newer than this UNIX timestamp

  • max_date (int 32-bit, optional) – Delete all messages older than this UNIX timestamp

Returns:

messages.AffectedHistory

TL Schema

messages.deleteSavedHistory#4dc5085f
flags:#
parent_peer:flags.0?InputPeer
peer:InputPeer
max_id:int
min_date:flags.2?int
max_date:flags.3?int

= messages.AffectedHistory

Parameter Tree

DeleteSavedHistory
├── parent_peerInputPeer (optional)
│ ├── 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
├── 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
├── max_idint
├── min_dateint (optional)
└── max_dateint (optional)

Example

await app.invoke(
    DeleteSavedHistory(
        parent_peer=await app.resolve_peer(chat_id),
        peer=await app.resolve_peer(chat_id),
        max_id=0,
        min_date=0,
        max_date=0,
    )
)