Skip to content

getChatPinnedMessage

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

Returns information about a pinned chat message.

getChatPinnedMessage(chat_id)
Field Type Description
chat_id int53 Identifier of the chat the message belongs to

Example

  • Get information about a pinned chat message in group 1234567890.

    getChatPinnedMessage(1234567890)

    Response:

    {
      ["@type"] = "message",
      author_signature = "",
      can_be_deleted_for_all_users = true,
      can_be_deleted_only_for_self = false,
      can_be_edited = false,
      can_be_forwarded = true,
      chat_id = "1234567890",
      contains_unread_mention = false,
      content = {
        ["@type"] = "messageText",
        text = {
          ["@type"] = "formattedText",
          entities = {
            {
              ["@type"] = "textEntity",
              length = 20,
              offset = 5,
              type = {
                ["@type"] = "textEntityTypeCode"
              }
            }
          },
          text = "Test getChatPinnedMessage"
        }
      },
      date = 1530423072,
      edit_date = 0,
      id = "16308502528",
      is_channel_post = false,
      is_outgoing = false,
      media_album_id = "0",
      reply_to_message_id = 0,
      sender_user_id = 999999999,
      ttl = 0,
      ttl_expires_in = 0,
      via_bot_user_id = 0,
      views = 0
    }

Frequently Asked Questions
The Functions

Clone this wiki locally