We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aue@aaak:~/telegram-bot-sdk# php stest.php PHP Fatal error: Uncaught exception 'Irazasyed\Telegram\Exceptions\TelegramUndefinedPropertyException' in /aue/telegram-bot-sdk/src/Objects/BaseObject.php:144 Stack trace: #0 /aue/telegram-bot-sdk/stest.php(13): Irazasyed\Telegram\Objects\BaseObject->__call('getLastName', Array) #1 /aue/telegram-bot-sdk/stest.php(13): Irazasyed\Telegram\Objects\User->getLastName() #2 {main} thrown in /aue/telegram-bot-sdk/src/Objects/BaseObject.php on line 144
aue@aaak:~/telegram-bot-sdk# cat stest.php <?php $loader = require __DIR__.'/vendor/autoload.php'; use Irazasyed\Telegram\Telegram; $telegram = new Telegram('XX:XX'); $response = $telegram->getMe(); $botId = $response->getId(); $firstName = $response->getFirstName(); $lastName = $response->getLastName(); $username = $response->getUsername(); echo $botId . ' ' . $firstName . ' ' . $lastName . ' ' . $username;
The text was updated successfully, but these errors were encountered:
Actually, Bots don't have last name. So you need not use getLastName(). I've removed from the README example as well.
getLastName()
LastName will be available for the actual user though. So you can remove that and it'll work fine.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: