Class InputMediaDocument

java.lang.Object
io.github.natanimn.telebof.types.input.InputMediaBuilder<InputMediaDocument>
io.github.natanimn.telebof.types.input.InputMediaDocument
All Implemented Interfaces:
InputMedia, Serializable

public class InputMediaDocument extends InputMediaBuilder<InputMediaDocument>
Represents a general file to be sent.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputMediaDocument

      public InputMediaDocument(String media)
      Required
      Parameters:
      media - File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass an HTTP URL for Telegram to get a file from the Internet.
    • InputMediaDocument

      public InputMediaDocument(File media)
      Required
      Parameters:
      media - File to send. Pass a File to upload from you local machine
  • Method Details

    • thumbnail

      public InputMediaDocument 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:
      InputMediaDocument
    • disableContentTypeDetection

      public InputMediaDocument 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(InputMediaDocument(File). Always True, if the document is sent as part of an album.
      Returns:
      InputMediaDocument