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

public class InputMediaAnimation extends InputMediaBuilder<InputMediaAnimation>
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputMediaAnimation

      public InputMediaAnimation(String media)
      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

      public InputMediaAnimation(File media)
      Constructor for InputMediaAnimation with File media
      Parameters:
      media - File to send.
  • Method Details

    • setHasSpoiler

      public InputMediaAnimation setHasSpoiler(Boolean hasSpoiler)
      Parameters:
      hasSpoiler - Pass True if the animation needs to be covered with a spoiler animation
      Returns:
      this
    • setDuration

      public InputMediaAnimation setDuration(Integer duration)
      Parameters:
      duration - Animation duration in seconds
      Returns:
      this
    • setHeight

      public InputMediaAnimation setHeight(Integer height)
      Parameters:
      height - Animation height
      Returns:
      this
    • setWidth

      public InputMediaAnimation setWidth(Integer width)
      Parameters:
      width - Animation width
      Returns:
      this
    • setThumbnail

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