The user enters the / setzavtra command, the bot sends a message with an example of how to enter data and waits for the next message, receiving records in a variable. The question is how to get a new message? I saw the getUpdates method in the api documentation, but firstly I don’t know if I need it, and secondly I just can’t call it.
public void onUpdateReceived(Update update) { Tomorrow lessons = new Tomorrow(); Message message = update.getMessage(); if(message != null && message.hasText()) { switch(message.getText()) { case "/setzavtra": sendMsg(message, "Введите информацию в следующем виде: "+"\n"+lessons.Example());//через метод класса показываю как должен выглядеть ввод //хочу считать текст следующего сообщения, но не знаю как break; default: sendMsg(message, "Я - бот"); break; } } }