Closed Donaboyev closed 2 weeks ago
MaybeInaccessibleMessage
is a new class added by telegram because sometimes BOTs may receive callbacks from messages that they can't read.
You can check if the maybeInaccessibleMessage
is of type Message
, and then cast it. Something like this:
if (update.callbackQuery().maybeInaccessibleMessage() instanceof Message) {
Message message = (Message)update.callbackQuery().maybeInaccessibleMessage();
}
I want to get Update -> callbackQuery -> message -> replyMarkup But message() function is deprecated that says use maybeInaccessibleMessage instead. Unfortunately, maybeInaccessibleMessage has not replyMarkup.
The goal is updating message's InlineKeyboardButtons. Or how can I achieve this in another way?