Class SendDocument


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

  • Method Details

    • caption

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

      public SendDocument 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:
      SendDocument
    • thumbnail

      public SendDocument 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.
      Returns:
      SendDocument
    • thumbnail

      public SendDocument 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.
      Returns:
      SendDocument
    • disableContentTypeDetection

      public SendDocument disableContentTypeDetection(boolean disable_content_type_detection)
      Optional
      Parameters:
      disable_content_type_detection - Disables automatic server-side content type detection for files uploaded using multipart/form-data
      Returns:
      SendDocument