Constructor: user

Back to constructors index

Indicates info about a certain user

Attributes:

Name Type Required Description
self Bool Optional Whether this user indicates the currently logged in user
contact Bool Optional Whether this user is a contact
mutual_contact Bool Optional Whether this user is a mutual contact
deleted Bool Optional Whether the account of this user was deleted
bot Bool Optional Is this user a bot?
bot_chat_history Bool Optional Can the bot see all messages in groups?
bot_nochats Bool Optional Can the bot be added to groups?
verified Bool Optional Whether this user is verified
restricted Bool Optional Access to this user must be restricted for the reason specified in restriction_reason
min Bool Optional See min
bot_inline_geo Bool Optional Whether the bot can request our geolocation in inline mode
support Bool Optional Whether this is an official support user
scam Bool Optional This may be a scam user
apply_min_photo Bool Optional  
id int Yes ID of the user
access_hash long Optional Access hash of the user
first_name string Optional First name
last_name string Optional Last name
username string Optional Username
phone string Optional Phone number
photo UserProfilePhoto Optional Profile picture of user
status UserStatus Optional Online status of user
bot_info_version int Optional Version of the bot_info field in userFull, incremented every time it changes
restriction_reason Array of RestrictionReason Optional Contains the reason why access to this user must be restricted.
bot_inline_placeholder string Optional Inline placeholder for this inline bot
lang_code string Optional Language code of the user

Type: User

Example:

$user = ['_' => 'user', 'self' => Bool, 'contact' => Bool, 'mutual_contact' => Bool, 'deleted' => Bool, 'bot' => Bool, 'bot_chat_history' => Bool, 'bot_nochats' => Bool, 'verified' => Bool, 'restricted' => Bool, 'min' => Bool, 'bot_inline_geo' => Bool, 'support' => Bool, 'scam' => Bool, 'apply_min_photo' => Bool, 'id' => int, 'access_hash' => long, 'first_name' => 'string', 'last_name' => 'string', 'username' => 'string', 'phone' => 'string', 'photo' => UserProfilePhoto, 'status' => UserStatus, 'bot_info_version' => int, 'restriction_reason' => [RestrictionReason, RestrictionReason], 'bot_inline_placeholder' => 'string', 'lang_code' => 'string'];

Or, if you’re into Lua:

user={_='user', self=Bool, contact=Bool, mutual_contact=Bool, deleted=Bool, bot=Bool, bot_chat_history=Bool, bot_nochats=Bool, verified=Bool, restricted=Bool, min=Bool, bot_inline_geo=Bool, support=Bool, scam=Bool, apply_min_photo=Bool, id=int, access_hash=long, first_name='string', last_name='string', username='string', phone='string', photo=UserProfilePhoto, status=UserStatus, bot_info_version=int, restriction_reason={RestrictionReason}, bot_inline_placeholder='string', lang_code='string'}

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