Optional
params: {Additional search parameters
Optional
addOffset?: numberAdditional offset from offset, in resulting messages.
This can be used for advanced use cases, like:
MSGID
:
offset = MSGID, addOffset = -20, limit = 20
MSGID
:
offset = MSGID, addOffset = -10, limit = 20
When offset is not set, this will be relative to the last message
Optional
chatId?: InputPeerLikeChat where to search for messages.
When empty, will search across common message box (i.e. private messages and legacy chats)
Optional
filter?: TypeMessagesFilterFilter the results using some filter (see SearchFilters)
SearchFilters.Empty (i.e. will return all messages)
Optional
fromUser?: InputPeerLikeSearch only for messages sent by a specific user.
You can pass their marked ID, username, phone or "me"
or "self"
Optional
limit?: numberLimits the number of messages to be retrieved.
Optional
maxDate?: number | DateMaximum message date to return
Optional
maxId?: numberOptional
minDate?: number | DateMinimum message date to return
Optional
minId?: numberMinimum message ID to return
Optional
offset?: numberOffset ID for the search. Only messages earlier than this ID will be returned.
Optional
query?: stringText query string. Required for text-only messages, optional for media.
Optional
threadId?: numberThread ID to return only messages from this thread.
Optional
chunkSize?: numberChunk size, which will be passed as limit
parameter
for messages.search
. Usually you shouldn't care about this.
Optional
limit?: numberLimits the number of messages to be retrieved.
Search for messages inside a specific chat
Iterable version of searchMessages