@Test public void sendMessage() { SendResponse sendResponse = bot.execute(new SendMessage(chatId, "reply this message").replyMarkup(new ForceReply())); MessageTest.checkTextMessage(sendResponse.message()); assertNotNull(sendResponse.message().from()); sendResponse = bot.execute(new SendMessage(chatId, "remove keyboard") .replyMarkup(new ReplyKeyboardRemove()) .disableNotification(true) .replyToMessageId(8087) ); MessageTest.checkTextMessage(sendResponse.message()); assertNotNull(sendResponse.message().replyToMessage()); sendResponse = bot.execute(new SendMessage(chatId, "message with keyboard") .parseMode(ParseMode.HTML) .disableWebPagePreview(false) .replyMarkup(new ReplyKeyboardMarkup( new KeyboardButton("contact").requestContact(true), new KeyboardButton("location").requestLocation(true)) .oneTimeKeyboard(true) .resizeKeyboard(true) .selective(true))); MessageTest.checkTextMessage(sendResponse.message()); sendResponse = bot.execute(new SendMessage(chatId, "simple buttons") .replyMarkup(new ReplyKeyboardMarkup("ok", "cancel"))); MessageTest.checkTextMessage(sendResponse.message()); }
public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) { return api.send(request); }
TelegramBot { public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) { return api.send(request); } }
TelegramBot { public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) { return api.send(request); } TelegramBot(String botToken);   TelegramBot(Builder builder); }
TelegramBot { public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) { return api.send(request); } TelegramBot(String botToken);   TelegramBot(Builder builder); R execute(BaseRequest<T, R> request); void execute(T request, Callback<T, R> callback); String getFullFilePath(File file); byte[] getFileContent(File file); void setUpdatesListener(UpdatesListener listener); void setUpdatesListener(UpdatesListener listener, GetUpdates request); void setUpdatesListener(UpdatesListener listener, ExceptionHandler exceptionHandler); void setUpdatesListener(UpdatesListener listener, ExceptionHandler exceptionHandler, GetUpdates request); void removeGetUpdatesListener(); }
TelegramBot { public <T extends BaseRequest<T, R>, R extends BaseResponse> R execute(BaseRequest<T, R> request) { return api.send(request); } TelegramBot(String botToken);   TelegramBot(Builder builder); R execute(BaseRequest<T, R> request); void execute(T request, Callback<T, R> callback); String getFullFilePath(File file); byte[] getFileContent(File file); void setUpdatesListener(UpdatesListener listener); void setUpdatesListener(UpdatesListener listener, GetUpdates request); void setUpdatesListener(UpdatesListener listener, ExceptionHandler exceptionHandler); void setUpdatesListener(UpdatesListener listener, ExceptionHandler exceptionHandler, GetUpdates request); void removeGetUpdatesListener();  }