pub struct User {Show 14 fields
pub id: i32,
pub first_name: String,
pub last_name: String,
pub username: String,
pub phone_number: String,
pub status: UserStatus,
pub profile_photo: Option<ProfilePhoto>,
pub outgoing_link: LinkState,
pub incoming_link: LinkState,
pub is_verified: bool,
pub restriction_reason: String,
pub have_access: bool,
pub type_: UserType,
pub language_code: Option<String>,
}
Expand description
Represents a user
Fields§
§id: i32
User identifier
first_name: String
First name of the user
last_name: String
Last name of the user
username: String
Username of the user
phone_number: String
Phone number of the user
status: UserStatus
Current online status of the user
profile_photo: Option<ProfilePhoto>
Profile photo of the user; may be null
outgoing_link: LinkState
Relationship from the current user to the other user
incoming_link: LinkState
Relationship from the other user to the current user
is_verified: bool
True, if the user is verified
restriction_reason: String
If non-empty, it contains the reason why access to this user must be restricted. The format of the string is “{type}: {description}”. {type} contains the type of the restriction and at least one of the suffixes “-all”, “-ios”, “-android”, or “-wp”, which describe the platforms on which access should be restricted. (For example, “terms-ios-android”. {description} contains a human-readable description of the restriction, which can be shown to the user)
have_access: bool
If false, the user is inaccessible, and the only information known about the user is inside this class. It can’t be passed to any method except GetUser
type_: UserType
Type of the user
language_code: Option<String>
IETF language tag of the user’s language; only available to bots