Skip to content

getTopChats

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

Returns a list of frequently used chats.
Supported only if the chat info database is enabled.

getTopChats(category, limit, callback, data)
Field Type Description
category string Category of chats to be returned. Users, Bots, Groups, Channels, InlineBots, Calls
limit int32 Maximum number of chats to be returned; up to 30.

Example

  • Get three frequently used chats with bots.

    getTopChats('Bots', 3)

    Response:

    {
      ["@type"] = "chats",
      chat_ids = {
        777777777,
        888888888,
        999999999
      }
    }

Frequently Asked Questions
The Functions

Clone this wiki locally