rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.78k stars 1.22k forks source link

setChatID #866

Closed gaukler2 closed 3 years ago

gaukler2 commented 3 years ago

If i try your example, i get an error..

SendMessage message = new SendMessage().setChatId(update.getMessage().getChatId()).setText(update.getMessage().getText());

The method setChatid(String) in the type SendMessage is not applicable for the arguments (Long)

Flexeus commented 3 years ago

Use String.valueOf method

rubenlagus commented 3 years ago

Check steps to update: https://github.com/rubenlagus/TelegramBots/wiki/How-To-Update#to-version-500, should explain how to solve that problem