Skip to content

sendSticker

Sahri Riza Umami edited this page Jun 12, 2018 · 3 revisions

Sends a sticker message.

sendSticker(chat_id, reply_to_message_id, sticker, width, height, disable_notification, thumbnail, thumb_width, thumb_height, from_background, reply_markup, callback, data)
Field Type Description
chat_id int53 Chat to send message.
reply_to_message_id int53 Identifier of a message to reply to.
sticker inputFile Sticker to be sent.
width int32 Sticker width.
height int32 Sticker height.
disable_notification Bool Pass true, to disable notification about the message, doesn't works in secret chats
thumbnail inputThumb Sticker thumbnail, if available.
thumb_width int32 Thumbnail width, usually shouldn't exceed 90. Use 0 if unknown.
thumb_height int32 Thumbnail height, usually shouldn't exceed 90. Use 0 if unknown.
from_background Bool Pass true, if the message is sent from background
reply_markup ReplyMarkup Bots only. Markup for replying to message

Example

  • Send a sticker by its remote ids which is CAADBAADjQADI7sJBuLNiWA-uBDOAg, into chat 1234567890.

    sendSticker(1234567890, msg.id, 'CAADBAADjQADI7sJBuLNiWA-uBDOAg')

    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"] = "messageSticker",
        sticker = {
          ["@type"] = "sticker",
          emoji = "😟",
          height = 512,
          is_mask = false,
          set_id = "435084598016212995",
          sticker = {
            ["@type"] = "file",
            expected_size = 14854,
            id = 8,
            ["local"] = {
              ["@type"] = "localFile",
              can_be_deleted = false,
              can_be_downloaded = true,
              downloaded_prefix_size = 0,
              downloaded_size = 0,
              is_downloading_active = false,
              is_downloading_completed = false,
              path = ""
            },
            remote = {
              ["@type"] = "remoteFile",
              id = "CAADBAADjQADI7sJBuLNiWA-uBDOAg",
              is_uploading_active = false,
              is_uploading_completed = true,
              uploaded_size = 14854
            },
            size = 14854
          },
          thumbnail = {
            ["@type"] = "photoSize",
            height = 128,
            photo = {
              ["@type"] = "file",
              expected_size = 4804,
              id = 7,
              ["local"] = {
                ["@type"] = "localFile",
                can_be_deleted = false,
                can_be_downloaded = true,
                downloaded_prefix_size = 0,
                downloaded_size = 0,
                is_downloading_active = false,
                is_downloading_completed = false,
                path = ""
              },
              remote = {
                ["@type"] = "remoteFile",
                id = "AAQEABN9MmMwAARj0wVvvQAB9pfROQACAg",
                is_uploading_active = false,
                is_uploading_completed = true,
                uploaded_size = 4804
              },
              size = 4804
            },
            type = "s",
            width = 128
          },
          width = 512
        }
      },
      date = 1528830849,
      edit_date = 0,
      id = "15979249673",
      is_channel_post = false,
      is_outgoing = true,
      media_album_id = "0",
      reply_to_message_id = "15979249664",
      sender_user_id = 13374432,
      sending_state = {
        ["@type"] = "messageSendingStatePending"
      },
      ttl = 0,
      ttl_expires_in = 0,
      via_bot_user_id = 0,
      views = 0
    }  

Frequently Asked Questions
The Functions

Clone this wiki locally