Skip to content

How to process the keyboard #79

Answered by punyflash
JekaSylar asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! It seems everything fine with your code. As error says, you have old callback_query update which was expired on telegram end. You can just do:

$this->exceptions(false)->answerCallbackQuery();

In that case, even if Telegram has expired callback query, the exception will not be thrown. Or you can catch the exception manually:

try {
    $this->answerCallbackQuery();
} catch (\Throwable $e) {
   // process
}

Or even using Laravel's helper:

rescue(fn () => $this->answerCallbackQuery());

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by punyflash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants