Class InputMediaAudio

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

public class InputMediaAudio extends InputMediaBuilder<InputMediaAudio> implements Serializable
Represents an audio file to be treated as music to be sent.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputMediaAudio

      public InputMediaAudio(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.
    • InputMediaAudio

      public InputMediaAudio(File media)
      Required
      Parameters:
      media - File to send. Pass an object of File to upload from your local machine.
  • Method Details

    • thumbnail

      public InputMediaAudio thumbnail(File thumbnail)
      Optional
      Parameters:
      thumbnail - humbnail 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:
      InputMediaAudio
    • performer

      public InputMediaAudio performer(String performer)
      Optional
      Parameters:
      performer - Performer of the audio
      Returns:
      InputMediaAudio
    • title

      public InputMediaAudio title(String title)
      Optional
      Parameters:
      title - Title of the audio
      Returns:
      InputMediaAudio
    • duration

      public InputMediaAudio duration(int duration)
      Optional
      Parameters:
      duration - Duration of the audio in seconds
      Returns:
      InputMediaAudio