botman / driver-telegram

BotMan Telegram Driver
MIT License
86 stars 75 forks source link

How to get callback_query_id into Conversation #106

Closed Odilbukh closed 1 month ago

Odilbukh commented 2 years ago

Description:

How to get callback_query_id from ?

Steps To Reproduce:

 $this->ask($inline_keyboard, function (Answer $answer) use ($textMessage) {
            $selectedText = $answer->getText();
            $selectedValue = $answer->getValue();

            if ($selectedValue == "plus"){
                $this->bot->sendRequest('answerCallbackQuery', [
                    'callback_query_id' => 'HERE NEED callback_query_id',
                    'text' => "+ 1 товар"
                ]);
            }
        ........

image

filippotoso commented 1 month ago

In 2.0.6 you'll be able to call $answer->getCallbackId()