Class InputSticker

java.lang.Object
io.github.natanimn.telebof.types.input.InputSticker
All Implemented Interfaces:
InputMedia, Serializable

public abstract class InputSticker extends Object implements InputMedia
This object describes a sticker to be added to a sticker set.
Since:
3 March 2025
See Also:
  • Constructor Details

    • InputSticker

      public InputSticker(File sticker, StickerFormat format, String[] emoji_list)
      Required
      Parameters:
      sticker - The added sticker. Pass an object of File to upload from your local machine.
      format - Format of the added sticker, must be one of StickerFormat.STATIC for a .WEBP or .PNG image, StickerFormat.ANIMATED for a .TGS animation, StickerFormat.VIDEO for a .WEBM video
      emoji_list - List of 1-20 emoji associated with the sticker
    • InputSticker

      public InputSticker(String sticker, StickerFormat format, String[] emoji_list)
      Required
      Parameters:
      sticker - The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, or pass an HTTP URL as a String for Telegram to get a file from the Internet.
      format - Format of the added sticker, must be one of StickerFormat.STATIC for a .WEBP or .PNG image, StickerFormat.ANIMATED for a .TGS animation, StickerFormat.VIDEO for a .WEBM video
      emoji_list - List of 1-20 emoji associated with the sticker
  • Method Details

    • maskPosition

      public InputSticker maskPosition(MaskPosition mask_position)
      Optional
      Parameters:
      mask_position - Position where the mask should be placed on faces. For “mask” stickers only.
      Returns:
      InputSticker
    • keywords

      public InputSticker keywords(String[] keywords)
      Optional
      Parameters:
      keywords - List of 0-20 search keywords for the sticker with total length of up to 64 characters. For StickerType.REGULAR and StickerType.CUSTOM_EMOJI stickers only.
      Returns:
      InputSticker
    • hasFile

      public boolean hasFile()
      Used only for internal purpose
      Specified by:
      hasFile in interface InputMedia
      Returns:
      boolean
    • getFiles

      public List<File> getFiles()
      Used only for internal purpose
      Specified by:
      getFiles in interface InputMedia
      Returns:
      List of files