telegram api method · layer 229 · #4dc5085f
messages.deleteSavedHistory
Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».
definition
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;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
parent_peer | InputPeer | If set, affects the messages of the passed monoforum topic », otherwise affects saved messages ». |
peer | InputPeer | Peer, whose messages will be deleted from saved messages », or the ID of the topic. |
max_id | int | Maximum ID of message to delete |
min_date | int | Delete all messages newer than this UNIX timestamp |
max_date | int | Delete all messages older than this UNIX timestamp |
returns
errors (3)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 170–229 · constructor id changed 1×
| id | layers |
|---|---|
| #6e98102b | 170–203 |
| #4dc5085f | 204–229 |