public abstract class AbsSender extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbsSender() |
| Modifier and Type | Method and Description |
|---|---|
abstract Boolean |
addStickerToSet(AddStickerToSet addStickerToSet)
Adds a new sticker to a set (https://core.telegram.org/bots/api#addStickerToSet)
|
Boolean |
answerCallbackQuery(AnswerCallbackQuery answerCallbackQuery)
Deprecated.
|
void |
answerCallbackQueryAsync(AnswerCallbackQuery answerCallbackQuery,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
answerInlineQuery(AnswerInlineQuery answerInlineQuery)
Deprecated.
|
void |
answerInlineQueryAsync(AnswerInlineQuery answerInlineQuery,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
answerPreCheckoutQuery(AnswerPreCheckoutQuery answerPreCheckoutQuery)
Deprecated.
|
void |
answerPreCheckoutQuery(AnswerPreCheckoutQuery answerPreCheckoutQuery,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
answerShippingQuery(AnswerShippingQuery answerShippingQuery)
Deprecated.
|
void |
answerShippingQuery(AnswerShippingQuery answerShippingQuery,
SentCallback<Boolean> sentCallback)
Deprecated.
|
abstract Boolean |
createNewStickerSet(CreateNewStickerSet createNewStickerSet)
Creates a new sticker set (https://core.telegram.org/bots/api#createNewStickerSet)
|
Boolean |
deleteChatPhoto(DeleteChatPhoto deleteChatPhoto)
Deprecated.
|
void |
deleteChatPhoto(DeleteChatPhoto deleteChatPhoto,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
deleteMessage(DeleteMessage deleteMessage)
Deprecated.
|
void |
deleteMessage(DeleteMessage deleteMessage,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
deleteWebhook(DeleteWebhook deleteWebhook)
Deprecated.
|
void |
deleteWebhook(DeleteWebhook deleteWebhook,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Serializable |
editMessageCaption(EditMessageCaption editMessageCaption)
Deprecated.
|
void |
editMessageCaptionAsync(EditMessageCaption editMessageCaption,
SentCallback<Serializable> sentCallback)
Deprecated.
|
Serializable |
editMessageReplyMarkup(EditMessageReplyMarkup editMessageReplyMarkup)
Deprecated.
|
void |
editMessageReplyMarkup(EditMessageReplyMarkup editMessageReplyMarkup,
SentCallback<Serializable> sentCallback)
Deprecated.
|
Serializable |
editMessageText(EditMessageText editMessageText)
Deprecated.
|
void |
editMessageTextAsync(EditMessageText editMessageText,
SentCallback<Serializable> sentCallback)
Deprecated.
|
<T extends Serializable,Method extends BotApiMethod<T>> |
execute(Method method) |
<T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> |
executeAsync(Method method,
Callback callback) |
String |
exportChatInviteLink(ExportChatInviteLink exportChatInviteLink)
Deprecated.
|
void |
exportChatInviteLinkAsync(ExportChatInviteLink exportChatInviteLink,
SentCallback<String> sentCallback)
Deprecated.
|
Message |
forwardMessage(ForwardMessage forwardMessage)
Deprecated.
|
void |
forwardMessageAsync(ForwardMessage forwardMessage,
SentCallback<Message> sentCallback)
Deprecated.
|
Chat |
getChat(GetChat getChat)
Deprecated.
|
List<ChatMember> |
getChatAdministrators(GetChatAdministrators getChatAdministrators)
Deprecated.
|
void |
getChatAdministratorsAsync(GetChatAdministrators getChatAdministrators,
SentCallback<ArrayList<ChatMember>> sentCallback)
Deprecated.
|
void |
getChatAsync(GetChat getChat,
SentCallback<Chat> sentCallback)
Deprecated.
|
ChatMember |
getChatMember(GetChatMember getChatMember)
Deprecated.
|
void |
getChatMemberAsync(GetChatMember getChatMember,
SentCallback<ChatMember> sentCallback)
Deprecated.
|
Integer |
getChatMemberCount(GetChatMemberCount getChatMemberCount)
Deprecated.
|
void |
getChatMemberCountAsync(GetChatMemberCount getChatMemberCount,
SentCallback<Integer> sentCallback)
Deprecated.
|
File |
getFile(GetFile getFile)
Deprecated.
|
void |
getFileAsync(GetFile getFile,
SentCallback<File> sentCallback)
Deprecated.
|
Serializable |
getGameHighScores(GetGameHighScores getGameHighScores)
Deprecated.
|
void |
getGameHighScoresAsync(GetGameHighScores getGameHighScores,
SentCallback<ArrayList<GameHighScore>> sentCallback)
Deprecated.
|
User |
getMe() |
void |
getMeAsync(SentCallback<User> sentCallback) |
UserProfilePhotos |
getUserProfilePhotos(GetUserProfilePhotos getUserProfilePhotos)
Deprecated.
|
void |
getUserProfilePhotosAsync(GetUserProfilePhotos getUserProfilePhotos,
SentCallback<UserProfilePhotos> sentCallback)
Deprecated.
|
WebhookInfo |
getWebhookInfo() |
void |
getWebhookInfoAsync(SentCallback<WebhookInfo> sentCallback) |
Boolean |
kickMember(KickChatMember kickChatMember)
Deprecated.
|
void |
kickMemberAsync(KickChatMember kickChatMember,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
leaveChat(LeaveChat leaveChat)
Deprecated.
|
void |
leaveChatAsync(LeaveChat leaveChat,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
pinChatMessage(PinChatMessage pinChatMessage)
Deprecated.
|
void |
pinChatMessage(PinChatMessage pinChatMessage,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
promoteChatMember(PromoteChatMember promoteChatMember)
Deprecated.
|
void |
promoteChatMember(PromoteChatMember promoteChatMember,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
restrictChatMember(RestrictChatMember restrictChatMember)
Deprecated.
|
void |
restrictChatMember(RestrictChatMember restrictChatMember,
SentCallback<Boolean> sentCallback)
Deprecated.
|
protected abstract <T extends Serializable,Method extends BotApiMethod<T>> |
sendApiMethod(Method method) |
protected abstract <T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> |
sendApiMethodAsync(Method method,
Callback callback) |
abstract Message |
sendAudio(SendAudio sendAudio)
Sends a file using Send Audio method (https://core.telegram.org/bots/api#sendaudio)
|
Boolean |
sendChatAction(SendChatAction sendChatAction)
Deprecated.
|
void |
sendChatActionAsync(SendChatAction sendChatAction,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Message |
sendContact(SendContact sendContact)
Deprecated.
|
void |
sendContactAsync(SendContact sendContact,
SentCallback<Message> sentCallback)
Deprecated.
|
abstract Message |
sendDocument(SendDocument sendDocument) |
Message |
sendGame(SendGame sendGame)
Deprecated.
|
void |
sendGameAsync(SendGame sendGame,
SentCallback<Message> sentCallback)
Deprecated.
|
Message |
sendInvoice(SendInvoice sendInvoice)
Deprecated.
|
void |
sendInvoice(SendInvoice sendInvoice,
SentCallback<Message> sentCallback)
Deprecated.
|
Message |
sendLocation(SendLocation sendLocation)
Deprecated.
|
void |
sendLocationAsync(SendLocation sendLocation,
SentCallback<Message> sentCallback)
Deprecated.
|
abstract List<Message> |
sendMediaGroup(SendMediaGroup sendMediaGroup)
Send a media group (https://core.telegram.org/bots/api#sendMediaGroup)
|
Message |
sendMessage(SendMessage sendMessage)
Deprecated.
|
void |
sendMessageAsync(SendMessage sendMessage,
SentCallback<Message> sentCallback)
Deprecated.
|
abstract Message |
sendPhoto(SendPhoto sendPhoto) |
abstract Message |
sendSticker(SendSticker sendSticker) |
Message |
sendVenue(SendVenue sendVenue)
Deprecated.
|
void |
sendVenueAsync(SendVenue sendVenue,
SentCallback<Message> sentCallback)
Deprecated.
|
abstract Message |
sendVideo(SendVideo sendVideo) |
abstract Message |
sendVideoNote(SendVideoNote sendVideoNote) |
abstract 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 |
setChatDescription(SetChatDescription setChatDescription)
Deprecated.
|
void |
setChatDescription(SetChatDescription setChatDescription,
SentCallback<Boolean> sentCallback)
Deprecated.
|
abstract Boolean |
setChatPhoto(SetChatPhoto setChatPhoto)
Set chat profile photo (https://core.telegram.org/bots/api#setChatPhoto)
|
Boolean |
setChatTitle(SetChatTitle setChatTitle)
Deprecated.
|
void |
setChatTitle(SetChatTitle setChatTitle,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Serializable |
setGameScore(SetGameScore setGameScore)
Deprecated.
|
void |
setGameScoreAsync(SetGameScore setGameScore,
SentCallback<Serializable> sentCallback)
Deprecated.
|
Boolean |
unbanMember(UnbanChatMember unbanChatMember)
Deprecated.
|
void |
unbanMemberAsync(UnbanChatMember unbanChatMember,
SentCallback<Boolean> sentCallback)
Deprecated.
|
Boolean |
unpinChatMessage(UnpinChatMessage unpinChatMessage)
Deprecated.
|
void |
unpinChatMessage(UnpinChatMessage unpinChatMessage,
SentCallback<Boolean> sentCallback)
Deprecated.
|
abstract File |
uploadStickerFile(UploadStickerFile uploadStickerFile)
Upload a new file as sticker (https://core.telegram.org/bots/api#uploadStickerFile)
|
public <T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> void executeAsync(Method method, Callback callback) throws TelegramApiException
TelegramApiExceptionpublic <T extends Serializable,Method extends BotApiMethod<T>> T execute(Method method) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendMessage(SendMessage sendMessage) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean answerInlineQuery(AnswerInlineQuery answerInlineQuery) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean sendChatAction(SendChatAction sendChatAction) throws TelegramApiException
TelegramApiException@Deprecated public final Message forwardMessage(ForwardMessage forwardMessage) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendLocation(SendLocation sendLocation) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendVenue(SendVenue sendVenue) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendContact(SendContact sendContact) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean kickMember(KickChatMember kickChatMember) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean unbanMember(UnbanChatMember unbanChatMember) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean leaveChat(LeaveChat leaveChat) throws TelegramApiException
TelegramApiException@Deprecated public final Chat getChat(GetChat getChat) throws TelegramApiException
TelegramApiException@Deprecated public final String exportChatInviteLink(ExportChatInviteLink exportChatInviteLink) throws TelegramApiException
TelegramApiException@Deprecated public final List<ChatMember> getChatAdministrators(GetChatAdministrators getChatAdministrators) throws TelegramApiException
TelegramApiException@Deprecated public final ChatMember getChatMember(GetChatMember getChatMember) throws TelegramApiException
TelegramApiException@Deprecated public final Integer getChatMemberCount(GetChatMemberCount getChatMemberCount) throws TelegramApiException
TelegramApiException@Deprecated public final Serializable editMessageText(EditMessageText editMessageText) throws TelegramApiException
TelegramApiException@Deprecated public final Serializable editMessageCaption(EditMessageCaption editMessageCaption) throws TelegramApiException
TelegramApiException@Deprecated public final Serializable editMessageReplyMarkup(EditMessageReplyMarkup editMessageReplyMarkup) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean answerCallbackQuery(AnswerCallbackQuery answerCallbackQuery) throws TelegramApiException
TelegramApiException@Deprecated public final UserProfilePhotos getUserProfilePhotos(GetUserProfilePhotos getUserProfilePhotos) throws TelegramApiException
TelegramApiException@Deprecated public final File getFile(GetFile getFile) throws TelegramApiException
TelegramApiExceptionpublic final User getMe() throws TelegramApiException
TelegramApiExceptionpublic final WebhookInfo getWebhookInfo() throws TelegramApiException
TelegramApiException@Deprecated public final Serializable setGameScore(SetGameScore setGameScore) throws TelegramApiException
TelegramApiException@Deprecated public final Serializable getGameHighScores(GetGameHighScores getGameHighScores) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendGame(SendGame sendGame) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean deleteWebhook(DeleteWebhook deleteWebhook) throws TelegramApiException
TelegramApiException@Deprecated public final Message sendInvoice(SendInvoice sendInvoice) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean answerShippingQuery(AnswerShippingQuery answerShippingQuery) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean answerPreCheckoutQuery(AnswerPreCheckoutQuery answerPreCheckoutQuery) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean deleteMessage(DeleteMessage deleteMessage) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean deleteChatPhoto(DeleteChatPhoto deleteChatPhoto) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean pinChatMessage(PinChatMessage pinChatMessage) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean unpinChatMessage(UnpinChatMessage unpinChatMessage) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean promoteChatMember(PromoteChatMember promoteChatMember) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean restrictChatMember(RestrictChatMember restrictChatMember) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean setChatDescription(SetChatDescription setChatDescription) throws TelegramApiException
TelegramApiException@Deprecated public final Boolean setChatTitle(SetChatTitle setChatTitle) throws TelegramApiException
TelegramApiException@Deprecated public final void sendMessageAsync(SendMessage sendMessage, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void answerInlineQueryAsync(AnswerInlineQuery answerInlineQuery, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendChatActionAsync(SendChatAction sendChatAction, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void forwardMessageAsync(ForwardMessage forwardMessage, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendLocationAsync(SendLocation sendLocation, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendVenueAsync(SendVenue sendVenue, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendContactAsync(SendContact sendContact, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void kickMemberAsync(KickChatMember kickChatMember, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void unbanMemberAsync(UnbanChatMember unbanChatMember, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void leaveChatAsync(LeaveChat leaveChat, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getChatAsync(GetChat getChat, SentCallback<Chat> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void exportChatInviteLinkAsync(ExportChatInviteLink exportChatInviteLink, SentCallback<String> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getChatAdministratorsAsync(GetChatAdministrators getChatAdministrators, SentCallback<ArrayList<ChatMember>> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getChatMemberAsync(GetChatMember getChatMember, SentCallback<ChatMember> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getChatMemberCountAsync(GetChatMemberCount getChatMemberCount, SentCallback<Integer> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void editMessageTextAsync(EditMessageText editMessageText, SentCallback<Serializable> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void editMessageCaptionAsync(EditMessageCaption editMessageCaption, SentCallback<Serializable> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void editMessageReplyMarkup(EditMessageReplyMarkup editMessageReplyMarkup, SentCallback<Serializable> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void answerCallbackQueryAsync(AnswerCallbackQuery answerCallbackQuery, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getUserProfilePhotosAsync(GetUserProfilePhotos getUserProfilePhotos, SentCallback<UserProfilePhotos> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getFileAsync(GetFile getFile, SentCallback<File> sentCallback) throws TelegramApiException
TelegramApiExceptionpublic final void getMeAsync(SentCallback<User> sentCallback) throws TelegramApiException
TelegramApiExceptionpublic final void getWebhookInfoAsync(SentCallback<WebhookInfo> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void setGameScoreAsync(SetGameScore setGameScore, SentCallback<Serializable> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void getGameHighScoresAsync(GetGameHighScores getGameHighScores, SentCallback<ArrayList<GameHighScore>> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendGameAsync(SendGame sendGame, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void deleteWebhook(DeleteWebhook deleteWebhook, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void sendInvoice(SendInvoice sendInvoice, SentCallback<Message> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void answerShippingQuery(AnswerShippingQuery answerShippingQuery, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void answerPreCheckoutQuery(AnswerPreCheckoutQuery answerPreCheckoutQuery, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void deleteMessage(DeleteMessage deleteMessage, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void deleteChatPhoto(DeleteChatPhoto deleteChatPhoto, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void pinChatMessage(PinChatMessage pinChatMessage, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void unpinChatMessage(UnpinChatMessage unpinChatMessage, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void promoteChatMember(PromoteChatMember promoteChatMember, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void restrictChatMember(RestrictChatMember restrictChatMember, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void setChatDescription(SetChatDescription setChatDescription, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiException@Deprecated public final void setChatTitle(SetChatTitle setChatTitle, SentCallback<Boolean> sentCallback) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendDocument(SendDocument sendDocument) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendPhoto(SendPhoto sendPhoto) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendVideo(SendVideo sendVideo) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendVideoNote(SendVideoNote sendVideoNote) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendSticker(SendSticker sendSticker) throws TelegramApiException
TelegramApiExceptionpublic abstract Message sendAudio(SendAudio sendAudio) throws TelegramApiException
sendAudio - Information to sendTelegramApiException - If there is any error sending the audiopublic abstract Message sendVoice(SendVoice sendVoice) throws TelegramApiException
sendVoice - Information to sendTelegramApiException - If there is any error sending the audiopublic abstract List<Message> sendMediaGroup(SendMediaGroup sendMediaGroup) throws TelegramApiException
TelegramApiException - If there is any error sending the media grouppublic abstract Boolean setChatPhoto(SetChatPhoto setChatPhoto) throws TelegramApiException
setChatPhoto - Information to set the photoTelegramApiException - If there is any error setting the photo.public abstract Boolean addStickerToSet(AddStickerToSet addStickerToSet) throws TelegramApiException
addStickerToSet - Information of the sticker to setTelegramApiException - If there is any error adding the sticker to the setpublic abstract Boolean createNewStickerSet(CreateNewStickerSet createNewStickerSet) throws TelegramApiException
createNewStickerSet - Information of the sticker set to createTelegramApiException - If there is any error creating the new sticker setpublic abstract File uploadStickerFile(UploadStickerFile uploadStickerFile) throws TelegramApiException
uploadStickerFile - Information of the file to upload as stickerTelegramApiException - If there is any error uploading the new fileprotected abstract <T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> void sendApiMethodAsync(Method method, Callback callback)
protected abstract <T extends Serializable,Method extends BotApiMethod<T>> T sendApiMethod(Method method) throws TelegramApiException
TelegramApiExceptionCopyright © 2018. All rights reserved.