Class SendAnimation


public class SendAnimation extends SendBuilder<SendAnimation, Message>
SendAnimation class. Returns Message on success.
Since:
3 March 2025
  • Constructor Details

  • Method Details

    • caption

      public SendAnimation caption(String caption)
      Optional
      Parameters:
      caption - Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
      Returns:
      SendAnimation
    • captionEntities

      public SendAnimation captionEntities(MessageEntity[] caption_entities)
      Optional
      Parameters:
      caption_entities - A list of special entities that appear in the caption, which can be specified instead of parse_mode
      Returns:
      SendAnimation
    • hasSpoiler

      public SendAnimation hasSpoiler(boolean has_spoiler)
      Optional
      Parameters:
      has_spoiler - Pass True if the animation needs to be covered with a spoiler animation
      Returns:
      SendAnimation
    • thumbnail

      public SendAnimation thumbnail(String thumbnail)
      Optional
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Thumbnails can't be reused and can be only uploaded as a new file
      Returns:
      SendAnimation
    • thumbnail

      public SendAnimation thumbnail(File thumbnail)
      Optional
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Thumbnails can't be reused and can be only uploaded as a new file
      Returns:
      SendAnimation
    • width

      public SendAnimation width(int width)
      Optional
      Parameters:
      width - Animation width
      Returns:
      SendAnimation
    • height

      public SendAnimation height(int height)
      Optional
      Parameters:
      height - Animation height
      Returns:
      SendAnimation
    • duration

      public SendAnimation duration(int duration)
      Optional
      Parameters:
      duration -
      Returns:
      SendAnimation
    • showCaptionAboveMedia

      public SendAnimation showCaptionAboveMedia(boolean show_caption_above_media)
      Optional
      Parameters:
      show_caption_above_media - Pass True, if the caption must be shown above the message media
      Returns:
      SendAnimation