MadelineProtoDocs/old_docs/API_docs_v66/constructors/user.md
2019-12-27 17:48:04 +01:00

3.4 KiB

title description image
user Indicates info about a certain user https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

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
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 string Optional Restriction reason
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, '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' => 'string', '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, 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='string', bot_inline_placeholder='string', lang_code='string'}