Closed samreachyan closed 2 years ago
I know why it's error exception. and if (update.hasCallbackquery cannot handle because, I have println which call method System.out.println(update.getMessage().getText()); is null out of IF Condition. So it cannot return value to display. So it's error
Currently I faced issued on handling callBackQuery on TelegramBot which I cannot catch event and reply the message as I want. You can comment my codes and help share me document solution resources.
and Bot.java
I want to welcome by Message and Show option
inlineKeyboardButton
. Then user click on the Button, we will handle clicked button and reply with a message or a photo.I already read this. https://github.com/rubenlagus/TelegramBots/wiki/FAQ#how_to_use_custom_keyboards
But I cannot handle when they click on that's button by Getting getCallbackQuery.data() to compare as command to send new message or send a photo.
I hope someone can guide me to solve that issue. Thanks you.