messages.GetHistory
- class pyrogram.raw.functions.messages.GetHistory
Returns the conversation history with one interlocutor / within a chat
- Details:
Layer:
223ID:
4423E6C5
- Parameters:
peer (
InputPeer) – Target peeroffset_id (
int32-bit) – Only return messages starting from the specified message IDoffset_date (
int32-bit) – Only return messages sent before the specified dateadd_offset (
int32-bit) – Number of list elements to be skipped, negative values are also accepted.limit (
int32-bit) – Number of results to returnmax_id (
int32-bit) – If a positive value was transferred, the method will return only messages with IDs less than max_idmin_id (
int32-bit) – If a positive value was transferred, the method will return only messages with IDs more than min_idhash (
int64-bit) – Result hash
- Returns:
TL Schema
messages.getHistory#4423e6c5
peer:InputPeer
offset_id:int
offset_date:int
add_offset:int
limit:int
max_id:int
min_id:int
hash:long
= messages.Messages
Parameter Tree
GetHistory
├── 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├── offset_id →
int├── offset_date →
int├── add_offset →
int├── limit →
int├── max_id →
int├── min_id →
int└── hash →
longExample
await app.invoke(
GetHistory(
peer=await app.resolve_peer(chat_id),
offset_id=0,
offset_date=0,
add_offset=0,
limit=0,
max_id=0,
min_id=0,
hash=0,
)
)