Class InputMediaAnimation
java.lang.Object
io.github.natanimn.telebof.types.input.InputMediaBuilder<InputMediaAnimation>
io.github.natanimn.telebof.types.input.InputMediaAnimation
- All Implemented Interfaces:
InputMedia,Serializable
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInputMediaAnimation(File media) Constructor for InputMediaAnimation with File mediaInputMediaAnimation(String media) Constructor for InputMediaAnimation with String media -
Method Summary
Modifier and TypeMethodDescriptionsetDuration(Integer duration) setHasSpoiler(Boolean hasSpoiler) setThumbnail(String thumbnail) Methods inherited from class io.github.natanimn.telebof.types.input.InputMediaBuilder
caption, captionEntities, getFiles, hasFile, parseMode
-
Constructor Details
-
InputMediaAnimation
Constructor for InputMediaAnimation with String media- 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
-
InputMediaAnimation
Constructor for InputMediaAnimation with File media- Parameters:
media- File to send.
-
-
Method Details
-
setHasSpoiler
- Parameters:
hasSpoiler- Pass True if the animation needs to be covered with a spoiler animation- Returns:
- this
-
setDuration
- Parameters:
duration- Animation duration in seconds- Returns:
- this
-
setHeight
- Parameters:
height- Animation height- Returns:
- this
-
setWidth
- Parameters:
width- Animation width- Returns:
- this
-
setThumbnail
- Parameters:
thumbnail- Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.- Returns:
- this
-