Skip to content

sendAnimation

Sahri Riza Umami edited this page Jun 15, 2017 · 4 revisions

Send an animation message

sendAnimation(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, animation, width, height, caption)  
Option Description
animation Animation file to send
thumb Animation thumb, if available
width Width of the animation, may be replaced by the server
height Height of the animation, may be replaced by the server
caption Animation caption, 0-200 characters

Example

  • Send animation message from a message with animation id 13.

    sendAnimation(-1001120734798, 0, 0, 1, nil, 13, nil, nil, 'This is a caption')  

    Returns:

    {
      ID = "Message",
      can_be_deleted_ = true,
      can_be_edited_ = false,
      chat_id_ = "-1001120734798",
      content_ = {
        ID = "MessageAnimation",
        animation_ = {
          ID = "Animation",
          animation_ = {
            ID = "File",
            id_ = 13,
            path_ = false,
            persistent_id_ = "CgADBQADqQkAAmWZcgOrnrb11_LuQwI",
            size_ = 629152
          },
          file_name_ = "AssuredFrigidGermanshorthairedpointer.mp4",
          height_ = 1080,
          mime_type_ = "video/mp4",
          thumb_ = {
            ID = "PhotoSize",
            height_ = 68,
            photo_ = {
              ID = "File",
              id_ = 14,
              path_ = false,
              persistent_id_ = "AAQFABNb7MAyAAQHc3yBPdBlu9keAAIC",
              size_ = 4851
            },
            type_ = "s",
            width_ = 90
          },
          width_ = 1920
        },
        caption_ = "This is a caption"
      },
      date_ = 1497540182,
      edit_date_ = 0,
      forward_info_ = false,
      id_ = "1572864000000001",
      is_post_ = false,
      reply_markup_ = false,
      reply_to_message_id_ = 0,
      send_state_ = {
        ID = "MessageIsBeingSent"
      },
      sender_user_id_ = 194211431,
      ttl_ = 0,
      ttl_expires_in_ = 0,
      via_bot_user_id_ = 0,
      views_ = 0
    }
  • Send animation message by its persistent_id.

    sendAnimation(-1001120734798, 0, 0, 1, nil, 'BQADBQADqQkAAmWZcgOrnrb11_LuQwI')  

    Returns:

    {
      ID = "Message",
      can_be_deleted_ = true,
      can_be_edited_ = false,
      chat_id_ = "-1001120734798",
      content_ = {
        ID = "MessageAnimation",
        animation_ = {
          ID = "Animation",
          animation_ = {
            ID = "File",
            id_ = 1323,
            path_ = false,
            persistent_id_ = "BQADBQADqQkAAmWZcgOrnrb11_LuQwI",
            size_ = 0
          },
          file_name_ = false,
          height_ = 0,
          mime_type_ = false,
          thumb_ = false,
          width_ = 0
        },
        caption_ = false
      },
      date_ = 1497539805,
      edit_date_ = 0,
      forward_info_ = false,
      id_ = "1572864000000001",
      is_post_ = false,
      reply_markup_ = false,
      reply_to_message_id_ = 0,
      send_state_ = {
        ID = "MessageIsBeingSent"
      },
      sender_user_id_ = 194211431,
      ttl_ = 0,
      ttl_expires_in_ = 0,
      via_bot_user_id_ = 0,
      views_ = 0
    }

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally