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

2.5 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
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

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, 'id' => int, 'access_hash' => long, 'first_name' => 'string', 'last_name' => 'string', 'username' => 'string', 'phone' => 'string', 'photo' => UserProfilePhoto, 'status' => UserStatus, 'bot_info_version' => int];

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, id=int, access_hash=long, first_name='string', last_name='string', username='string', phone='string', photo=UserProfilePhoto, status=UserStatus, bot_info_version=int}