public abstract class DefaultAbsSender extends AbsSender
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultAbsSender(DefaultBotOptions options) |
| Modifier and Type | Method and Description |
|---|---|
File |
downloadFile(File file) |
File |
downloadFile(String filePath) |
void |
downloadFileAsync(File file,
DownloadFileCallback<File> callback) |
void |
downloadFileAsync(String filePath,
DownloadFileCallback<String> callback) |
abstract String |
getBotToken()
Returns the token of the bot to be able to perform Telegram Api Requests
|
DefaultBotOptions |
getOptions() |
protected <T extends Serializable,Method extends BotApiMethod<T>> |
sendApiMethod(Method method) |
protected <T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> |
sendApiMethodAsync(Method method,
Callback callback) |
Message |
sendAudio(SendAudio sendAudio)
Sends a file using Send Audio method (https://core.telegram.org/bots/api#sendaudio)
|
Message |
sendDocument(SendDocument sendDocument) |
Message |
sendPhoto(SendPhoto sendPhoto) |
Message |
sendSticker(SendSticker sendSticker) |
Message |
sendVideo(SendVideo sendVideo) |
Message |
sendVoice(SendVoice sendVoice)
Sends a voice note using Send Voice method (https://core.telegram.org/bots/api#sendvoice)
For this to work, your audio must be in an .ogg file encoded with OPUS
|
answerCallbackQuery, answerCallbackQueryAsync, answerInlineQuery, answerInlineQueryAsync, editMessageCaption, editMessageCaptionAsync, editMessageReplyMarkup, editMessageReplyMarkup, editMessageText, editMessageTextAsync, forwardMessage, forwardMessageAsync, getChat, getChatAdministrators, getChatAdministratorsAsync, getChatAsync, getChatMember, getChatMemberAsync, getChatMemberCount, getChatMemberCountAsync, getFile, getFileAsync, getGameHighScores, getGameHighScoresAsync, getMe, getMeAsync, getUserProfilePhotos, getUserProfilePhotosAsync, getWebhookInfo, getWebhookInfoAsync, kickMember, kickMemberAsync, leaveChat, leaveChatAsync, sendChatAction, sendChatActionAsync, sendContact, sendContactAsync, sendGame, sendGameAsync, sendLocation, sendLocationAsync, sendMessage, sendMessageAsync, sendVenue, sendVenueAsync, setGameScore, setGameScoreAsync, unbanMember, unbanMemberAsyncprotected DefaultAbsSender(DefaultBotOptions options)
public abstract String getBotToken()
public final DefaultBotOptions getOptions()
public final File downloadFile(String filePath) throws TelegramApiException
TelegramApiExceptionpublic final File downloadFile(File file) throws TelegramApiException
TelegramApiExceptionpublic final void downloadFileAsync(String filePath, DownloadFileCallback<String> callback) throws TelegramApiException
TelegramApiExceptionpublic final void downloadFileAsync(File file, DownloadFileCallback<File> callback) throws TelegramApiException
TelegramApiExceptionpublic final Message sendDocument(SendDocument sendDocument) throws TelegramApiException
sendDocument in class AbsSenderTelegramApiExceptionpublic final Message sendPhoto(SendPhoto sendPhoto) throws TelegramApiException
sendPhoto in class AbsSenderTelegramApiExceptionpublic final Message sendVideo(SendVideo sendVideo) throws TelegramApiException
sendVideo in class AbsSenderTelegramApiExceptionpublic final Message sendSticker(SendSticker sendSticker) throws TelegramApiException
sendSticker in class AbsSenderTelegramApiExceptionpublic final Message sendAudio(SendAudio sendAudio) throws TelegramApiException
sendAudio in class AbsSendersendAudio - Information to sendTelegramApiException - If there is any error sending the audiopublic final Message sendVoice(SendVoice sendVoice) throws TelegramApiException
sendVoice in class AbsSendersendVoice - Information to sendTelegramApiException - If there is any error sending the audioprotected final <T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> void sendApiMethodAsync(Method method, Callback callback)
sendApiMethodAsync in class AbsSenderprotected final <T extends Serializable,Method extends BotApiMethod<T>> T sendApiMethod(Method method) throws TelegramApiException
sendApiMethod in class AbsSenderTelegramApiExceptionCopyright © 2016. All rights reserved.