public abstract class AbsSender extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbsSender() |
| Modifier and Type | Method and Description |
|---|---|
abstract Boolean |
execute(AddStickerToSet addStickerToSet)
Adds a new sticker to a set (https://core.telegram.org/bots/api#addStickerToSet)
|
abstract Boolean |
execute(CreateNewStickerSet createNewStickerSet)
Creates a new sticker set (https://core.telegram.org/bots/api#createNewStickerSet)
|
abstract Serializable |
execute(EditMessageMedia editMessageMedia)
Edit media in a message
|
<T extends Serializable,Method extends BotApiMethod<T>> |
execute(Method method) |
abstract Message |
execute(SendAnimation sendAnimation)
Send animation
|
abstract Message |
execute(SendAudio sendAudio)
Sends a file using Send Audio method (https://core.telegram.org/bots/api#sendaudio)
|
abstract Message |
execute(SendDocument sendDocument) |
abstract List<Message> |
execute(SendMediaGroup sendMediaGroup)
Send a media group (https://core.telegram.org/bots/api#sendMediaGroup)
|
abstract Message |
execute(SendPhoto sendPhoto) |
abstract Message |
execute(SendSticker sendSticker) |
abstract Message |
execute(SendVideo sendVideo) |
abstract Message |
execute(SendVideoNote sendVideoNote) |
abstract 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
|
abstract Boolean |
execute(SetChatPhoto setChatPhoto)
Set chat profile photo (https://core.telegram.org/bots/api#setChatPhoto)
|
abstract File |
execute(UploadStickerFile uploadStickerFile)
Upload a new file as sticker (https://core.telegram.org/bots/api#uploadStickerFile)
|
<T extends Serializable,Method extends BotApiMethod<T>,Callback extends SentCallback<T>> |
executeAsync(Method method,
Callback callback) |
User |
getMe() |
void |
getMeAsync(SentCallback<User> sentCallback) |
WebhookInfo |
getWebhookInfo() |
void |
getWebhookInfoAsync(SentCallback<WebhookInfo> sentCallback) |
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) |
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
TelegramApiExceptionpublic final User getMe() throws TelegramApiException
TelegramApiExceptionpublic final WebhookInfo getWebhookInfo() throws TelegramApiException
TelegramApiExceptionpublic final void getMeAsync(SentCallback<User> sentCallback) throws TelegramApiException
TelegramApiExceptionpublic final void getWebhookInfoAsync(SentCallback<WebhookInfo> sentCallback) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendDocument sendDocument) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendPhoto sendPhoto) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendVideo sendVideo) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendVideoNote sendVideoNote) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendSticker sendSticker) throws TelegramApiException
TelegramApiExceptionpublic abstract Message execute(SendAudio sendAudio) throws TelegramApiException
sendAudio - Information to sendTelegramApiException - If there is any error sending the audiopublic abstract Message execute(SendVoice sendVoice) throws TelegramApiException
sendVoice - Information to sendTelegramApiException - If there is any error sending the audiopublic abstract List<Message> execute(SendMediaGroup sendMediaGroup) throws TelegramApiException
TelegramApiException - If there is any error sending the media grouppublic abstract Boolean execute(SetChatPhoto setChatPhoto) throws TelegramApiException
setChatPhoto - Information to set the photoTelegramApiException - If there is any error setting the photo.public abstract Boolean execute(AddStickerToSet addStickerToSet) throws TelegramApiException
addStickerToSet - Information of the sticker to setTelegramApiException - If there is any error adding the sticker to the setpublic abstract Boolean execute(CreateNewStickerSet createNewStickerSet) throws TelegramApiException
createNewStickerSet - Information of the sticker set to createTelegramApiException - If there is any error creating the new sticker setpublic abstract File execute(UploadStickerFile uploadStickerFile) throws TelegramApiException
uploadStickerFile - Information of the file to upload as stickerTelegramApiException - If there is any error uploading the new filepublic abstract Serializable execute(EditMessageMedia editMessageMedia) throws TelegramApiException
editMessageMedia - Information of the new mediaTelegramApiException - If there is any error editing the mediapublic abstract Message execute(SendAnimation sendAnimation) throws TelegramApiException
sendAnimation - Information of the animationTelegramApiException - If there is any error sending animationprotected 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 © 2019. All rights reserved.