pub struct User {Show 28 fields
pub id: i64,
pub first_name: String,
pub last_name: String,
pub usernames: Option<Usernames>,
pub phone_number: String,
pub status: UserStatus,
pub profile_photo: Option<ProfilePhoto>,
pub accent_color_id: i32,
pub background_custom_emoji_id: i64,
pub profile_accent_color_id: i32,
pub profile_background_custom_emoji_id: i64,
pub emoji_status: Option<EmojiStatus>,
pub is_contact: bool,
pub is_mutual_contact: bool,
pub is_close_friend: bool,
pub is_verified: bool,
pub is_premium: bool,
pub is_support: bool,
pub restriction_reason: String,
pub is_scam: bool,
pub is_fake: bool,
pub has_active_stories: bool,
pub has_unread_active_stories: bool,
pub restricts_new_chats: bool,
pub have_access: bool,
pub type: UserType,
pub language_code: String,
pub added_to_attachment_menu: bool,
}
Expand description
Represents a user
Fields§
§id: i64
User identifier
first_name: String
First name of the user
last_name: String
Last name of the user
usernames: Option<Usernames>
Usernames of the user; may be null
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
accent_color_id: i32
Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only
background_custom_emoji_id: i64
Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only
profile_accent_color_id: i32
Identifier of the accent color for the user’s profile; -1 if none. For Telegram Premium users only
profile_background_custom_emoji_id: i64
Identifier of a custom emoji to be shown on the background of the user’s profile; 0 if none. For Telegram Premium users only
emoji_status: Option<EmojiStatus>
Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
is_contact: bool
The user is a contact of the current user
is_mutual_contact: bool
The user is a contact of the current user and the current user is a contact of the user
is_close_friend: bool
The user is a close friend of the current user; implies that the user is a contact
is_verified: bool
True, if the user is verified
True, if the user is a Telegram Premium user
is_support: bool
True, if the user is Telegram support account
restriction_reason: String
If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
is_scam: bool
True, if many users reported this user as a scam
is_fake: bool
True, if many users reported this user as a fake account
has_active_stories: bool
True, if the user has non-expired stories available to the current user
has_unread_active_stories: bool
True, if the user has unread non-expired stories available to the current user
restricts_new_chats: bool
True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them
have_access: bool
If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can’t be passed to any method
type: UserType
Type of the user
language_code: String
IETF language tag of the user’s language; only available to bots
True, if the user added the current bot to attachment menu; only available to bots