Link Search Menu Expand Document

Method: getId

Gets a bot API ID from a username, update, message, or other related constructors.

Parameters:

NameType
idA username, a bot API chat id, a tg-cli chat id, a Chat, a User, an InputPeer, an InputUser, an InputChannel, a Peer, or a Chat object

Return type: integer

Example (now fully async!):

$id = $MadelineProto->getId($id);