MadelineProtoDocs/old_docs/API_docs_v55/constructors/user.md
Daniil Gentili f73c175203 Update docs
2018-12-26 01:56:50 +00:00

3.2 KiB

title description image
user User https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: user

Back to constructors index

User

Attributes:

Name Type Required Description
self Bool Optional Self?
contact Bool Optional Contact?
mutual_contact Bool Optional Mutual contact?
deleted Bool Optional Deleted?
bot Bool Optional Bot?
bot_chat_history Bool Optional Bot chat history?
bot_nochats Bool Optional Bot nochats?
verified Bool Optional Verified?
restricted Bool Optional Restricted?
min Bool Optional Min?
bot_inline_geo Bool Optional Bot inline geo?
id int Yes ID
access_hash long Optional Access hash
first_name string Optional First name
last_name string Optional Last name
username string Optional Username
phone string Optional Phone
photo UserProfilePhoto Optional Photo
status UserStatus Optional Status
bot_info_version int Optional Bot info version
restriction_reason string Optional Restriction reason
bot_inline_placeholder string Optional Bot inline placeholder

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'];

PWRTelegram json-encoded version:

{"_": "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"}

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'}