User
class User
This object represents a Telegram user or bot.
Methods
No description
Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
True, if this user is a bot.
User's or bot's first name.
Optional. User's or bot's last name.
Optional. User's or bot's username.
Optional. IETF language tag of the user's language.
Optional. True, if this user is a Telegram Premium user.
Optional. True, if this user added the bot to the attachment menu.
Optional. True, if the bot can be invited to groups. Returned only in getMe.
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
Optional. True, if the bot supports inline queries. Returned only in getMe.
Details
at line 23
__construct(int $id, bool $is_bot, string $first_name, string|null $last_name = null, string|null $username = null, string|null $language_code = null, bool|null $is_premium = null, bool|null $added_to_attachment_menu = null, bool|null $can_join_groups = null, bool|null $can_read_all_group_messages = null, bool|null $supports_inline_queries = null)
No description
at line 41
int
getId()
Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
at line 49
bool
getIsBot()
True, if this user is a bot.
at line 57
string
getFirstName()
User's or bot's first name.
at line 65
string|null
getLastName()
Optional. User's or bot's last name.
at line 73
string|null
getUsername()
Optional. User's or bot's username.
at line 81
string|null
getLanguageCode()
Optional. IETF language tag of the user's language.
at line 89
bool|null
getIsPremium()
Optional. True, if this user is a Telegram Premium user.
at line 97
bool|null
getAddedToAttachmentMenu()
Optional. True, if this user added the bot to the attachment menu.
at line 105
bool|null
getCanJoinGroups()
Optional. True, if the bot can be invited to groups. Returned only in getMe.
at line 113
bool|null
getCanReadAllGroupMessages()
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
at line 121
bool|null
getSupportsInlineQueries()
Optional. True, if the bot supports inline queries. Returned only in getMe.