pub struct User {
pub id: i64,
pub is_bot: bool,
pub first_name: String,
pub last_name: Option<String>,
pub username: Option<String>,
pub language_code: Option<String>,
pub is_premium: bool,
pub added_to_attachment_menu: bool,
pub can_join_groups: bool,
pub can_read_all_group_messages: bool,
pub supports_inline_queries: bool,
}Expand description
This object represents a Telegram user or bot.
Fields§
§id: i64Unique identifier for this user or bot.
This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
is_bot: boolTrue, if this user is a bot
first_name: StringUser’s or bot’s first name
last_name: Option<String>User’s or bot’s last name
username: Option<String>User’s or bot’s username
language_code: Option<String>IETF language tag of the user’s language
True, if this user is a Telegram Premium user
True, if this user added the bot to the attachment menu
can_join_groups: boolTrue, if the bot can be invited to groups. Returned only in getMe.
can_read_all_group_messages: boolTrue, if privacy mode is disabled for the bot. Returned only in getMe.
supports_inline_queries: boolTrue, if the bot supports inline queries. Returned only in getMe.