messages.DeleteHistory
- class pyrogram.raw.functions.messages.DeleteHistory
Deletes communication history.
- Details:
Layer:
223ID:
B08F922A
- Parameters:
peer (
InputPeer) – User or chat, communication history of which will be deletedmax_id (
int32-bit) – Maximum ID of message to deletejust_clear (
bool, optional) – Just clear history for the current user, without actually removing messages for every chat userrevoke (
bool, optional) – Whether to delete the message history for all chat participantsmin_date (
int32-bit, optional) – Delete all messages newer than this UNIX timestampmax_date (
int32-bit, optional) – Delete all messages older than this UNIX timestamp
- Returns:
TL Schema
messages.deleteHistory#b08f922a
flags:#
just_clear:flags.0?true
revoke:flags.1?true
peer:InputPeer
max_id:int
min_date:flags.2?int
max_date:flags.3?int
= messages.AffectedHistory
Parameter Tree
DeleteHistory
├── just_clear →
true (optional)├── revoke →
true (optional)├── peer →
InputPeer│ ├──
InputPeerEmpty│ ├──
InputPeerSelf│ ├──
InputPeerChat│ │ └── chat_id →
long│ ├──
InputPeerUser│ │ ├── user_id →
long│ │ └── access_hash →
long│ ├──
InputPeerChannel│ │ ├── channel_id →
long│ │ └── access_hash →
long│ ├──
InputPeerUserFromMessage│ │ ├── 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├── max_id →
int├── min_date →
int (optional)└── max_date →
int (optional)Example
await app.invoke(
DeleteHistory(
just_clear=None,
revoke=None,
peer=await app.resolve_peer(chat_id),
max_id=0,
min_date=0,
max_date=0,
)
)