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
Represents an audio file to be treated as music to be sent.
- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetDuration(Integer duration) Optional.setHasSpoiler(Boolean hasSpoiler) Optional.setPerformer(String performer) Optional.setThumbnail(String thumbnail) Optional.Optional.Methods inherited from class io.github.natanimn.telebof.types.input.InputMediaBuilder
caption, captionEntities, getFiles, hasFile, parseMode
-
Constructor Details
-
InputMediaAudio
Required- Parameters:
media- File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended). pass an HTTP URL for Telegram to get a file from the Internet.
-
InputMediaAudio
Required- Parameters:
media- File to send. Pass an object of File to upload from your local machine.
-
-
Method Details
-
setThumbnail
Optional.- Parameters:
thumbnail- Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
-
setPerformer
Optional.- Parameters:
performer- Performer of the audio
-
setTitle
Optional.- Parameters:
title- Title of the audio
-
setDuration
Optional.- Parameters:
duration- Duration of the audio in seconds
-
setHasSpoiler
Optional.- Parameters:
hasSpoiler- Pass True if the audio needs to be covered with a spoiler animation
-