Skip to content

toggleChatIsPinned

Sahri Riza Umami edited this page Jun 23, 2018 · 5 revisions

Changes the pinned state of a chat.
You can pin up to GetOption("pinned_chat_count_max") non-secret chats and the same number of secret chats.

toggleChatIsPinned(chat_id, is_pinned, callback, data)
Field Type Description
chat_id int53 Chat identifier.
is_pinned Bool New value of is_pinned.

Example

  • Pin chat 1234567890.

    toggleChatIsPinned(1234567890, 1)

    Response:

    {
      ["@type"] = "ok"
    }
  • Unpin chat 1234567890.

    toggleChatIsPinned(1234567890, 0)

    Response:

    {
      ["@type"] = "ok"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally