pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use Update model of the library

maximpavliv opened this issue · comments

Hello,

I set a Webhook to recover updates sent to my bot, and I wanted to use the Update model you define in your library to parse incoming requests json into, but you don't define any public constructors or setters in your Update.java class.
Is this done on purpose? If yes - for what reason?
Is there a way to use your Update class in an other manner, or do I have to define my own Update class for parsing json in incoming post requests?

Answered my own question: can use the Update update = parseUpdate(jsonInput); method in utility.BotUtils class