Как после нажатия кнопки в сообщении Телеграм-бота изменить это сообщение и убрать кнопки?

Имеется Telegram-Bot на базе: https://github.com/irazasyed/telegram-bot-sdk

Бот задаёт вопрос пользователю, пользователь нажимает на одну из кнопок - и далее Бот должен вставить смайлик перед текстом своего вопроса и убрать кнопки Да / Нет - как это сделать?

require_once( dirname(__FILE__) . '/../../vendor/autoload.php');

use Telegram\Bot\Commands\Command;
use Telegram\Bot\Keyboard\Keyboard;
  
class TelegramBotController extends Controller
{
    
    .....

    public function actionCommand()
    {
        
        $this->telegram = new Telegram\Bot\Api('XXXXX:XXXXXXXXXXXXXX');
        
        $this->update = $this->telegram->getWebhookUpdates();

        if ( isset($this->update['callback_query'])) {
            $this->message = $this->update['callback_query'];
        } else {
            $this->message = $this->update;
        }

        $chatId = $this->message['message']['chat']['id'];

        $this->text = $this->message["message"]["text"];

        $method = 'cmd_' . $this->lastCommand;
        if (method_exists('TelegramBotController', $method)) {
            $this->$method();            
        } 
    }    

    private function cmd_start()
    {
        $this->reply = "Земля круглая?";

        $this->keyboard = [
            [
                Keyboard::inlineButton(['text' => 'Да', 'callback_data' => 'yes']),
                Keyboard::inlineButton(['text' => 'Нет', 'callback_data' => 'no'])
            ]
        ];

        $this->sendMessage();
    }


    public function cmd_yes()
    {
        
    }

    public function sendMessage()
    {
        $data = array(
            'chat_id' => $this->chat->chat_id,
            'text' => $this->reply,
        );
        if (count($this->keyboard) and is_array($this->keyboard)) {
            $data['reply_markup'] = $this->telegram->replyKeyboardMarkup([ 
                'inline_keyboard' => $this->keyboard, 
                'resize_keyboard' => true, 
                'one_time_keyboard' => true, 
            ]);
        }

        $this->telegram->sendMessage($data);
    }

} 

Ответы (0 шт):