Class SendAudio


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

  • Method Details

    • caption

      public SendAudio caption(String caption)
      Optional
      Parameters:
      caption - Audio caption, 0-1024 characters after entities parsing
      Returns:
      SendAudio
    • captionEntities

      public SendAudio 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:
      SendAudio
    • duration

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

      public SendAudio performer(String performer)
      Optional
      Parameters:
      performer - Performer
      Returns:
      SendAudio
    • title

      public SendAudio title(String title)
      Optional
      Parameters:
      title - Track name
      Returns:
      SendAudio
    • thumbnail

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

      public SendAudio 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:
      SendAudio