Skip to content

searchMessages

Sahri Riza Umami edited this page Dec 8, 2016 · 2 revisions

Searches for messages in all chats except secret.

searchMessages(query, offset_date, offset_chat_id, offset_message_id, limit)

Returns result in reverse chronological order, i. e. in order of decreasing (date, chat_id, message_id).

Option Description
query Query to search for.
offset_date Date of the message to search from, you can use 0 or any date in the future to get results from the beginning.
offset_chat_id Chat identifier of the last found message or 0 for the first request.
offset_message_id Message identifier of the last found message or 0 for the first request.
limit Maximum number of messages to be returned, can't be greater than 100.

Example

searchMessages('dejavu', 0, 0, 0, 17)

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally