public abstract class DefaultAbsSender extends AbsSender
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
exe |
| 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) |
Boolean |
execute(AddStickerToSet addStickerToSet) |
Boolean |
execute(CreateNewStickerSet createNewStickerSet) |
Serializable |
execute(EditMessageMedia editMessageMedia) |
Message |
execute(SendAudio sendAudio)
Sends a file using Send Audio method (https://core.telegram.org/bots/api#sendaudio)
|
Message |
execute(SendDocument sendDocument) |
List<Message> |
execute(SendMediaGroup sendMediaGroup) |
Message |
execute(SendPhoto sendPhoto) |
Message |
execute(SendSticker sendSticker) |
Message |
execute(SendVideo sendVideo) |
Message |
execute(SendVideoNote sendVideoNote) |
Message |
execute(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
|
Boolean |
execute(SetChatPhoto setChatPhoto) |
File |
execute(UploadStickerFile uploadStickerFile) |
String |
getBaseUrl() |
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) |
execute, executeAsync, getMe, getMeAsync, getWebhookInfo, getWebhookInfoAsyncprotected final ExecutorService exe
protected 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 execute(SendDocument sendDocument) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic final Message execute(SendPhoto sendPhoto) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic final Message execute(SendVideo sendVideo) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic final Message execute(SendVideoNote sendVideoNote) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic final Message execute(SendSticker sendSticker) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic final Message execute(SendAudio sendAudio) throws TelegramApiException
execute in class AbsSendersendAudio - Information to sendTelegramApiException - If there is any error sending the audiopublic final Message execute(SendVoice sendVoice) throws TelegramApiException
execute in class AbsSendersendVoice - Information to sendTelegramApiException - If there is any error sending the audiopublic Boolean execute(SetChatPhoto setChatPhoto) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic List<Message> execute(SendMediaGroup sendMediaGroup) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic Boolean execute(AddStickerToSet addStickerToSet) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic Boolean execute(CreateNewStickerSet createNewStickerSet) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic File execute(UploadStickerFile uploadStickerFile) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionpublic Serializable execute(EditMessageMedia editMessageMedia) throws TelegramApiException
execute in class AbsSenderTelegramApiExceptionprotected 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 AbsSenderTelegramApiExceptionpublic String getBaseUrl()
Copyright © 2018. All rights reserved.