Class OutgoingStickerMessage

    • Method Detail

      • createWithImage

        public static OutgoingStickerMessage createWithImage​(byte[] image,
                                                             String filenameWithExtension,
                                                             String chatId,
                                                             Boolean disableNotification,
                                                             Long replyToMessageId)
        Creates OutgoingStickerMessage based on a given webp image.
        Parameters:
        image - the image
        filenameWithExtension - the name of the file to send. Example: file.webp
        chatId - Unique identifier for the target chat or username of the target channel
        disableNotification - Sends the message silently. Users will receive a notification with no sound.
        replyToMessageId - If the message is a reply, ID of the original message
        Returns:
        Sticker message.
      • createWithUrl

        public static OutgoingStickerMessage createWithUrl​(String url,
                                                           String chatId,
                                                           Boolean disableNotification,
                                                           Long replyToMessageId)
        Creates OutgoingStickerMessage based on a HTTP URL as a String for Telegram to get a .webp file from the Internet.
        Parameters:
        url - image URL
        chatId - Unique identifier for the target chat or username of the target channel
        disableNotification - Sends the message silently. Users will receive a notification with no sound.
        replyToMessageId - If the message is a reply, ID of the original message
        Returns:
        Sticker message.
      • createWithFileId

        public static OutgoingStickerMessage createWithFileId​(String fileId,
                                                              String chatId,
                                                              Boolean disableNotification,
                                                              Long replyToMessageId)
        Creates OutgoingStickerMessage based on a file_id to send a file that exists on the Telegram servers.
        Parameters:
        fileId - file_id as String to send a file that exists on the Telegram servers
        chatId - Unique identifier for the target chat or username of the target channel
        disableNotification - Sends the message silently. Users will receive a notification with no sound.
        replyToMessageId - If the message is a reply, ID of the original message
        Returns:
        Sticker message.
      • getSticker

        public String getSticker()
      • getStickerImage

        public byte[] getStickerImage()
      • getFilenameWithExtension

        public String getFilenameWithExtension()