Constructor: user
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 | If set, the profile picture for this user should be refetched |
fake | Bool | Optional | If set, this user was reported by many users as a fake or scam user: be careful when interacting with them. |
bot_attach_menu | Bool | Optional | Whether this bot offers an attachment menu web app |
premium | Bool | Optional | Whether this user is a Telegram Premium user |
attach_menu_enabled | Bool | Optional | Whether we installed the attachment menu web app offered by this bot |
bot_can_edit | Bool | Optional | |
close_friend | Bool | Optional | |
stories_hidden | Bool | Optional | |
stories_unavailable | Bool | Optional | |
contact_require_premium | Bool | Optional | |
bot_business | Bool | Optional | |
bot_has_main_app | Bool | Optional | |
id | long | 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 |
emoji_status | EmojiStatus | Optional | Emoji status |
usernames | Array of Username | Optional | |
stories_max_id | int | Optional | |
color | PeerColor | Optional | |
profile_color | PeerColor | Optional | |
bot_active_users | int | 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, 'support' => Bool, 'scam' => Bool, 'apply_min_photo' => Bool, 'fake' => Bool, 'bot_attach_menu' => Bool, 'premium' => Bool, 'attach_menu_enabled' => Bool, 'bot_can_edit' => Bool, 'close_friend' => Bool, 'stories_hidden' => Bool, 'stories_unavailable' => Bool, 'contact_require_premium' => Bool, 'bot_business' => Bool, 'bot_has_main_app' => Bool, 'id' => long, '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', 'emoji_status' => EmojiStatus, 'usernames' => [Username, Username], 'stories_max_id' => int, 'color' => PeerColor, 'profile_color' => PeerColor, 'bot_active_users' => int];