Skip to content

searchChats

Sahri Riza Umami edited this page Jul 1, 2018 · 5 revisions

Searches for the specified query in the title and username of already known chats, this is an offline request.
Returns chats in the order seen in the chat list.

searchChats(query, limit, callback, data)
Field Type Description
query string Query to search for. If the query is empty, returns up to 20 recently found chats
limit int32 Maximum number of chats to be returned

Example

  • Searches "Pegel" in the title of known chats. Limit search result to 5.

    searchChats('Pegel', 5)

    Response:

    {
      ["@type"] = "chats",
      chat_ids = {
        "-1001031861112",
        -15387310
      }
    }

Frequently Asked Questions
The Functions

Clone this wiki locally