@Test public void forwardMessage() { SendResponse response = bot.execute(new ForwardMessage(chatId, chatId, forwardMessageId).disableNotification(true)); Message message = response.message(); MessageTest.checkMessage(message); assertNotNull(message.forwardDate()); assertNotNull(message.forwardSenderName()); assertNull(message.forwardFrom()); User viaBot = message.viaBot(); UserTest.checkUser(viaBot); assertEquals("gif", viaBot.username()); message = bot.execute(new ForwardMessage(chatId, chatId, forwardMessageIdUser)).message(); MessageTest.checkMessage(message); assertNotNull(message.forwardDate()); assertNull(message.forwardSenderName()); assertNotNull(message.forwardFrom()); message = bot.execute(new ForwardMessage(channelName, channelName, 651)).message(); assertNotNull(message.authorSignature()); assertNotNull(message.forwardSignature()); assertEquals(Integer.valueOf(651), message.forwardFromMessageId()); Chat chat = message.forwardFromChat(); assertEquals(channelName, "@" + chat.username()); assertEquals(Chat.Type.channel, chat.type()); assertNull(message.forwardSenderName()); message = bot.execute(new ForwardMessage(chatId, groupId, 352)).message(); assertEquals(MessageEntity.Type.text_mention, message.entities()[0].type()); assertNotNull(message.entities()[0].user()); assertNotNull(message.forwardSenderName()); }
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();  }