searchMessages
Search for messages. USER-ONLY
Parameters
A chat ID. If specified, only the corresponding chat will be searched.
query?: string
A search query.
If specified, only messages sent by from
are returned.
A search filter to apply.
offset?: number
A message identifier to start searching after.
addOffset?: number
Additional offset.
threadId?: number
The identifier of a message thread to search in.
limit?: number
The maximum number of results to return. Must be in the range of 1-100. Defaults to 100.
Result
Message[]
Syntax
// Optional parameters.
// Any of the optional parameters can be omitted.
await client.searchMessages( {
chatId,
query,
from,
filter,
offset,
addOffset,
threadId,
limit,
});