Number of messages to be retrieved.
Due to limitations with the API retrieving more than 3000 messages will take longer than half a minute. (might even take longer)
if undefined is passed instead of a number the library will try to retrieve all the messages.
Offset date (messages previous to this date will be retrieved). Exclusive.
Offset message ID (only messages previous to the given ID will be retrieved). Exclusive.
All the messages with a higher (newer) ID or equal to this will be excluded.
All the messages with a lower (older) ID or equal to this will be excluded.
Additional message offset (all of the specified offsets + this offset = older messages).
The string to be used as a search query.
The filter to use when returning messages.
For instance, InputMessagesFilterPhotos would yield only messages containing photos.
Only messages from this user will be returned.
Wait time (in seconds) between different GetHistory requests.
Use this parameter to avoid hitting the FloodWaitError as needed.
If left to undefined, it will default to 1 second only if the number of messages is higher than 3000.
If the ids parameter is used, this time will default to 10 seconds only if the amount of IDs is higher than 300.
A single integer ID (or several IDs) for the message that should be returned.
This parameter takes precedence over the rest (which will be ignored if this is set).
This can for instance be used to get the message with ID 123 from a channel.
Note that if the message doesn"t exist, undefined will appear in its place.
If set to true
, the messages will be returned in reverse order (from oldest to newest, instead of the default newest to oldest).
This also means that the meaning of offsetId and offsetDate parameters is reversed, although they will still be exclusive.
minId
becomes equivalent to offsetId
instead of being maxId
as well since messages are returned in ascending order.
You cannot use this if both entity and ids are undefined.
If set to a message ID, the messages that reply to this ID will be returned.
This feature is also known as comments in posts of broadcast channels, or viewing threads in groups.
This feature can only be used in broadcast channels and their linked supergroups. Using it in a chat or private conversation will result in PEER_ID_INVALID error.
When using this parameter, the filter and search parameters have no effect, since Telegram's API doesn't support searching messages in replies.
If set to true
, messages which are scheduled will be returned.
All other parameters will be ignored for this, except entity
.
Generated using TypeDoc
Interface for iterating over messages. used in both iterMessages and getMessages.