Class OutgoingStickerMessage
java.lang.Object
org.apache.camel.component.telegram.model.OutgoingMessage
org.apache.camel.component.telegram.model.OutgoingStickerMessage
- All Implemented Interfaces:
Serializable
An outgoing sticker message.
- See Also:
-
Field Summary
Fields inherited from class org.apache.camel.component.telegram.model.OutgoingMessage
chatId, disableNotification, replyToMessageId
-
Method Summary
Modifier and TypeMethodDescriptionstatic OutgoingStickerMessage
createWithFileId
(String fileId, String chatId, Boolean disableNotification, Long replyToMessageId) CreatesOutgoingStickerMessage
based on a file_id to send a file that exists on the Telegram servers.static OutgoingStickerMessage
createWithImage
(byte[] image, String filenameWithExtension, String chatId, Boolean disableNotification, Long replyToMessageId) CreatesOutgoingStickerMessage
based on a given webp image.static OutgoingStickerMessage
createWithUrl
(String url, String chatId, Boolean disableNotification, Long replyToMessageId) CreatesOutgoingStickerMessage
based on a HTTP URL as a String for Telegram to get a .webp file from the Internet.byte[]
toString()
Methods inherited from class org.apache.camel.component.telegram.model.OutgoingMessage
getChatId, getDisableNotification, getReplyToMessageId, setChatId, setDisableNotification, setReplyToMessageId
-
Method Details
-
createWithImage
public static OutgoingStickerMessage createWithImage(byte[] image, String filenameWithExtension, String chatId, Boolean disableNotification, Long replyToMessageId) CreatesOutgoingStickerMessage
based on a given webp image.- Parameters:
image
- the imagefilenameWithExtension
- the name of the file to send. Example: file.webpchatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- 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) CreatesOutgoingStickerMessage
based on a HTTP URL as a String for Telegram to get a .webp file from the Internet.- Parameters:
url
- image URLchatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- 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) CreatesOutgoingStickerMessage
based on a file_id to send a file that exists on the Telegram servers.- Parameters:
fileId
- file_id asString
to send a file that exists on the Telegram serverschatId
- Unique identifier for the target chat or username of the target channeldisableNotification
- 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
-
getStickerImage
public byte[] getStickerImage() -
getFilenameWithExtension
-
toString
- Overrides:
toString
in classOutgoingMessage
-