TelegramBot / Api

Native PHP Wrapper for Telegram BOT API
MIT License
1.07k stars 324 forks source link

Как получить данные из sendContact #274

Closed Albert2106 closed 3 years ago

Albert2106 commented 3 years ago

$phone = $message->getContact();

Не получаеться

MyZik commented 3 years ago

Вы что получить хотите? getContact возвращает объект Contact.

https://github.com/TelegramBot/Api/blob/master/src/Types/Contact.php

$phone = $message->getContact()->getPhoneNumber()

Albert2106 commented 3 years ago

Спасибо