MadelineProtoDocs/docs/API_docs/constructors/user.md
Daniil Gentili e5a1324684 docufix
2018-04-04 23:19:57 +00:00

3.1 KiB

title description image
user user attributes, type and example https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: user

Back to constructors index

Attributes:

Name Type Required
self Bool Optional
contact Bool Optional
mutual_contact Bool Optional
deleted Bool Optional
bot Bool Optional
bot_chat_history Bool Optional
bot_nochats Bool Optional
verified Bool Optional
restricted Bool Optional
min Bool Optional
bot_inline_geo Bool Optional
id int Yes
access_hash long Optional
first_name string Optional
last_name string Optional
username string Optional
phone string Optional
photo UserProfilePhoto Optional
status UserStatus Optional
bot_info_version int Optional
restriction_reason string Optional
bot_inline_placeholder string Optional
lang_code string Optional

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

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