In latest release of TelegramBots SendMessage class methods setChatId(String chatId) and setText(String text) are returning void - hence cannot be chained on SendMessage constructor
Also, getChatId() is returning Long, rather than String, hence it should be converted to String while used in setChatId(String chatId)