pub struct User {Show 27 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 upgraded_gift_colors: Option<UpgradedGiftColors>,
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 verification_status: Option<VerificationStatus>,
pub is_premium: bool,
pub is_support: bool,
pub restriction_info: Option<RestrictionInfo>,
pub active_story_state: Option<ActiveStoryState>,
pub restricts_new_chats: bool,
pub paid_message_star_count: i64,
pub have_access: bool,
pub type: UserType,
pub language_code: String,
pub added_to_attachment_menu: bool,
}Expand description
Represents a user
Fields§
§id: i64User identifier
first_name: StringFirst name of the user
last_name: StringLast name of the user
usernames: Option<Usernames>Usernames of the user; may be null
phone_number: StringPhone number of the user
status: UserStatusCurrent online status of the user
profile_photo: Option<ProfilePhoto>Profile photo of the user; may be null
accent_color_id: i32Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview
background_custom_emoji_id: i64Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none
upgraded_gift_colors: Option<UpgradedGiftColors>Color scheme based on an upgraded gift to be used for the user instead of accent_color_id and background_custom_emoji_id; may be null if none
profile_accent_color_id: i32Identifier of the accent color for the user’s profile; -1 if none
profile_background_custom_emoji_id: i64Identifier of a custom emoji to be shown on the background of the user’s profile; 0 if none
emoji_status: Option<EmojiStatus>Emoji status to be shown instead of the default Telegram Premium badge; may be null
is_contact: boolThe user is a contact of the current user
is_mutual_contact: boolThe user is a contact of the current user and the current user is a contact of the user
is_close_friend: boolThe user is a close friend of the current user; implies that the user is a contact
verification_status: Option<VerificationStatus>Information about verification status of the user; may be null if none
True, if the user is a Telegram Premium user
is_support: boolTrue, if the user is Telegram support account
restriction_info: Option<RestrictionInfo>Information about restrictions that must be applied to the corresponding private chat; may be null if none
active_story_state: Option<ActiveStoryState>State of active stories of the user; may be null if the user has no active stories
restricts_new_chats: boolTrue, 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
paid_message_star_count: i64Number of Telegram Stars that must be paid by general user for each sent message to the user. If positive and userFullInfo is unknown, use canSendMessageToUser to check whether the current user must pay
have_access: boolIf 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: UserTypeType of the user
language_code: StringIETF 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