Getting info about the current user

Here’s how you can fetch info about the currently logged in user

$me = $MadelineProto->get_self();

\danog\MadelineProto\Logger::log("Hi ".$me['first_name']."!");

get_self returns a User object that contains info about the currently logged in user/bot, or false if the current instance is not logged in.

Next section

This site uses cookies, as described in the cookie policy. By clicking on "Accept" you consent to the use of cookies.