Class SendSticker
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<Message>
-
- org.telegram.telegrambots.meta.api.methods.send.SendSticker
-
- All Implemented Interfaces:
Validable
public class SendSticker extends PartialBotApiMethod<Message>
- Version:
- 1.0 Use this method to send .webp stickers. On success, the sent Message is returned.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHATID_FIELDstatic StringDISABLENOTIFICATION_FIELDstatic StringPATHstatic StringREPLYMARKUP_FIELDstatic StringREPLYTOMESSAGEID_FIELDstatic StringSTICKER_FIELD-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description SendSticker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessagedeserializeResponse(String answer)Deserialize a json answer to the response type to a methodSendStickerdisableNotification()SendStickerenableNotification()StringgetChatId()BooleangetDisableNotification()ReplyKeyboardgetReplyMarkup()IntegergetReplyToMessageId()InputFilegetSticker()SendStickersetChatId(Long chatId)SendStickersetChatId(String chatId)SendStickersetReplyMarkup(ReplyKeyboard replyMarkup)SendStickersetReplyToMessageId(Integer replyToMessageId)SendStickersetSticker(File file)SendStickersetSticker(String sticker)SendStickersetSticker(String stickerName, InputStream inputStream)SendStickersetSticker(InputFile sticker)StringtoString()voidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
CHATID_FIELD
public static final String CHATID_FIELD
- See Also:
- Constant Field Values
-
STICKER_FIELD
public static final String STICKER_FIELD
- See Also:
- Constant Field Values
-
DISABLENOTIFICATION_FIELD
public static final String DISABLENOTIFICATION_FIELD
- See Also:
- Constant Field Values
-
REPLYTOMESSAGEID_FIELD
public static final String REPLYTOMESSAGEID_FIELD
- See Also:
- Constant Field Values
-
REPLYMARKUP_FIELD
public static final String REPLYMARKUP_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChatId
public String getChatId()
-
setChatId
public SendSticker setChatId(String chatId)
-
setChatId
public SendSticker setChatId(Long chatId)
-
getSticker
public InputFile getSticker()
-
setSticker
public SendSticker setSticker(String sticker)
-
getReplyToMessageId
public Integer getReplyToMessageId()
-
setReplyToMessageId
public SendSticker setReplyToMessageId(Integer replyToMessageId)
-
getReplyMarkup
public ReplyKeyboard getReplyMarkup()
-
setReplyMarkup
public SendSticker setReplyMarkup(ReplyKeyboard replyMarkup)
-
setSticker
public SendSticker setSticker(InputFile sticker)
-
setSticker
public SendSticker setSticker(File file)
-
setSticker
public SendSticker setSticker(String stickerName, InputStream inputStream)
-
getDisableNotification
public Boolean getDisableNotification()
-
enableNotification
public SendSticker enableNotification()
-
disableNotification
public SendSticker disableNotification()
-
deserializeResponse
public Message deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<Message>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-