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 your local machine
  • Method Details

    • setThumbnail

      public InputMediaDocument setThumbnail(String thumbnail)
      Optional.
      Parameters:
      thumbnail - Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
    • setThumbnail

      public InputMediaDocument setThumbnail(File thumbnail)
      Optional.
      Parameters:
      thumbnail - Thumbnail file to upload from your local machine
    • setDisableContentTypeDetection

      public InputMediaDocument setDisableContentTypeDetection(Boolean disableContentTypeDetection)
      Optional.
      Parameters:
      disableContentTypeDetection - Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.