public abstract class DefaultAbsSender extends AbsSender
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultAbsSender(DefaultBotOptions options) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
addStickerToSet(AddStickerToSet addStickerToSet) |
Boolean |
createNewStickerSet(CreateNewStickerSet createNewStickerSet) |
File |
downloadFile(File file) |
File |
downloadFile(String filePath) |
void |
downloadFileAsync(File file,
DownloadFileCallback<File> callback) |
void |
downloadFileAsync(String filePath,
DownloadFileCallback<String> callback) |
protected 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) |
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 |
sendVideoNote(SendVideoNote sendVideoNote) |
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
|
Boolean |
setChatPhoto(SetChatPhoto setChatPhoto) |
File |
uploadStickerFile(UploadStickerFile uploadStickerFile) |
answerCallbackQuery, answerCallbackQueryAsync, answerInlineQuery, answerInlineQueryAsync, answerPreCheckoutQuery, answerPreCheckoutQuery, answerShippingQuery, answerShippingQuery, deleteChatPhoto, deleteChatPhoto, deleteMessage, deleteMessage, deleteWebhook, deleteWebhook, editMessageCaption, editMessageCaptionAsync, editMessageReplyMarkup, editMessageReplyMarkup, editMessageText, editMessageTextAsync, execute, executeAsync, exportChatInviteLink, exportChatInviteLinkAsync, forwardMessage, forwardMessageAsync, getChat, getChatAdministrators, getChatAdministratorsAsync, getChatAsync, getChatMember, getChatMemberAsync, getChatMemberCount, getChatMemberCountAsync, getFile, getFileAsync, getGameHighScores, getGameHighScoresAsync, getMe, getMeAsync, getUserProfilePhotos, getUserProfilePhotosAsync, getWebhookInfo, getWebhookInfoAsync, kickMember, kickMemberAsync, leaveChat, leaveChatAsync, pinChatMessage, pinChatMessage, promoteChatMember, promoteChatMember, restrictChatMember, restrictChatMember, sendChatAction, sendChatActionAsync, sendContact, sendContactAsync, sendGame, sendGameAsync, sendInvoice, sendInvoice, sendLocation, sendLocationAsync, sendMessage, sendMessageAsync, sendVenue, sendVenueAsync, setChatDescription, setChatDescription, setChatTitle, setChatTitle, setGameScore, setGameScoreAsync, unbanMember, unbanMemberAsync, unpinChatMessage, unpinChatMessageprotected 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 sendVideoNote(SendVideoNote sendVideoNote) throws TelegramApiException
sendVideoNote 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 audiopublic Boolean setChatPhoto(SetChatPhoto setChatPhoto) throws TelegramApiException
setChatPhoto in class AbsSenderTelegramApiExceptionpublic Boolean addStickerToSet(AddStickerToSet addStickerToSet) throws TelegramApiException
addStickerToSet in class AbsSenderTelegramApiExceptionpublic Boolean createNewStickerSet(CreateNewStickerSet createNewStickerSet) throws TelegramApiException
createNewStickerSet in class AbsSenderTelegramApiExceptionpublic File uploadStickerFile(UploadStickerFile uploadStickerFile) throws TelegramApiException
uploadStickerFile 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 AbsSenderTelegramApiExceptionprotected String getBaseUrl()
Copyright © 2017. All rights reserved.