mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-11-26 20:35:03 +01:00
1.8 KiB
1.8 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
messages.getMessages | Returns the list of messages by their IDs. | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/messages_getMessages.html |
Method: messages.getMessages
Warning: flood wait
Warning: this method is prone to rate limiting with flood waits, which can lead to !!! ACCOUNT BANS !!!, please use the updates event handler, instead (which is 100% safe) »
Warning: non-realtime results
Warning: this method is not suitable for receiving messages in real-time from chats and users, please use the updates event handler, instead »
Warning: this is probably NOT what you need
You probably need to use the updates event handler, instead » :)
Returns the list of messages by their IDs.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
id | Array of Message ID or InputMessage | Message ID list | Yes |
Return type: messages.Messages
Can bots use this method: YES
MadelineProto Example (now async for huge speed and parallelism!):
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->getMessages(id: [$InputMessage, $InputMessage], );