mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-11 16:50:37 +01:00
51 lines
2.4 KiB
Markdown
51 lines
2.4 KiB
Markdown
|
---
|
||
|
title: "messages.getReplies"
|
||
|
description: "Get messages in a reply thread"
|
||
|
grand_parent: "Telegram RPC API"
|
||
|
parent: "Methods"
|
||
|
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
|
||
|
redirect_from: /API_docs/methods/messages_getReplies.html
|
||
|
---
|
||
|
# Method: messages.getReplies
|
||
|
[Back to methods index](index.html)
|
||
|
|
||
|
|
||
|
|
||
|
Get messages in a reply thread
|
||
|
|
||
|
### Parameters:
|
||
|
|
||
|
| Name | Type | Description | Required |
|
||
|
|----------|---------------|-------------|----------|
|
||
|
|peer|[Username, chat ID, Update, Message or InputPeer](/API_docs/types/InputPeer.html) | Peer | Optional|
|
||
|
|msg\_id|[int](/API_docs/types/int.html) | Message ID | Optional|
|
||
|
|offset\_id|[int](/API_docs/types/int.html) | [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) | Optional|
|
||
|
|offset\_date|[int](/API_docs/types/int.html) | [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) | Optional|
|
||
|
|add\_offset|[int](/API_docs/types/int.html) | [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) | Optional|
|
||
|
|limit|[int](/API_docs/types/int.html) | Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) | Optional|
|
||
|
|max\_id|[int](/API_docs/types/int.html) | If a positive value was transferred, the method will return only messages with ID smaller than max\_id | Optional|
|
||
|
|min\_id|[int](/API_docs/types/int.html) | If a positive value was transferred, the method will return only messages with ID bigger than min\_id | Optional|
|
||
|
|hash|Array of [long](/API_docs/types/long.html) | [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) | Optional|
|
||
|
|
||
|
|
||
|
### Return type: [messages.Messages](/API_docs/types/messages.Messages.html)
|
||
|
|
||
|
### Can bots use this method: **NO**
|
||
|
|
||
|
|
||
|
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
|
||
|
|
||
|
|
||
|
```php
|
||
|
if (!file_exists('madeline.php')) {
|
||
|
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
|
||
|
}
|
||
|
include 'madeline.php';
|
||
|
|
||
|
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
|
||
|
$MadelineProto->start();
|
||
|
|
||
|
$messages_Messages = $MadelineProto->messages->getReplies(peer: $InputPeer, msg_id: $int, offset_id: $int, offset_date: $int, add_offset: $int, limit: $int, max_id: $int, min_id: $int, hash: [$long, $long], );
|
||
|
```
|
||
|
|