Class SendAudio
java.lang.Object
org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<T>
org.telegram.telegrambots.meta.api.methods.send.SendMediaBotMethod<Message>
org.telegram.telegrambots.meta.api.methods.send.SendAudio
- All Implemented Interfaces:
Validable
- Version:
- 1.0 Use this method to send audio files, Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in an .mp3 format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
- Author:
- Ruben Bermudez
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserializeResponse
(String answer) Deserialize a json answer to the response type to a methodvoid
void
getFile()
Getter for method path (that is the same as method name)getThumb()
Deprecated.void
void
Deprecated.Use {#setThumbnail(InputFile)
}void
validate()
Validates that mandatory fields are filled and optional objectsMethods inherited from class org.telegram.telegrambots.meta.api.methods.send.SendMediaBotMethod
getAllowSendingWithoutReply, getChatId, getDisableNotification, getMessageThreadId, getProtectContent, getReplyToMessageId
Methods inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Field Details
-
PATH
- See Also:
-
DURATION_FIELD
- See Also:
-
CHATID_FIELD
- See Also:
-
MESSAGETHREADID_FIELD
- See Also:
-
AUDIO_FIELD
- See Also:
-
REPLYTOMESSAGEID_FIELD
- See Also:
-
DISABLENOTIFICATION_FIELD
- See Also:
-
REPLYMARKUP_FIELD
- See Also:
-
PERFOMER_FIELD
- See Also:
-
TITLE_FIELD
- See Also:
-
CAPTION_FIELD
- See Also:
-
PARSEMODE_FIELD
- See Also:
-
THUMBNAIL_FIELD
- See Also:
-
CAPTION_ENTITIES_FIELD
- See Also:
-
ALLOWSENDINGWITHOUTREPLY_FIELD
- See Also:
-
PROTECTCONTENT_FIELD
- See Also:
-
-
Constructor Details
-
SendAudio
public SendAudio()
-
-
Method Details
-
setChatId
-
enableNotification
public void enableNotification() -
disableNotification
public void disableNotification() -
deserializeResponse
Description copied from class:PartialBotApiMethod
Deserialize a json answer to the response type to a method- Specified by:
deserializeResponse
in classPartialBotApiMethod<Message>
- Parameters:
answer
- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
Description copied from interface:Validable
Validates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException
- If any mandatory field is empty
-
getMethod
Description copied from class:PartialBotApiMethod
Getter for method path (that is the same as method name)- Specified by:
getMethod
in classPartialBotApiMethod<Message>
- Returns:
- Method path
-
getFile
- Specified by:
getFile
in classSendMediaBotMethod<Message>
-
getFileField
- Specified by:
getFileField
in classSendMediaBotMethod<Message>
-
getThumb
Deprecated.Use {#getThumbnail()
} -
setThumb
Deprecated.Use {#setThumbnail(InputFile)
}
-
#getThumbnail()
}