pub struct User {Show 18 fields
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: Option<bool>,
pub added_to_attachment_menu: Option<bool>,
pub can_join_groups: Option<bool>,
pub can_read_all_group_messages: Option<bool>,
pub supports_inline_queries: Option<bool>,
pub can_connect_to_business: Option<bool>,
pub has_main_web_app: Option<bool>,
pub has_topics_enabled: Option<bool>,
pub allows_users_to_create_topics: Option<bool>,
pub can_manage_bots: Option<bool>,
pub supports_guest_queries: Option<bool>,
pub supports_join_request_queries: Option<bool>,
}Expand description
Represents a Telegram user or bot.
Fields§
§id: i64Unique identifier for this user or bot.
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: Option<bool>Bots only — true if the bot can be invited to groups.
can_read_all_group_messages: Option<bool>Bots only — true if privacy mode is disabled for the bot.
supports_inline_queries: Option<bool>Bots only — true if the bot supports inline queries.
can_connect_to_business: Option<bool>Bots only — true if the bot can be connected to a Telegram Business account.
has_main_web_app: Option<bool>Bots only — true if the bot has a main Web App.
has_topics_enabled: Option<bool>Bots only — true if the bot has forum topic mode enabled in private chats.
allows_users_to_create_topics: Option<bool>Bots only — true if the bot allows users to create and delete topics in private chats.
can_manage_bots: Option<bool>Bots only — true if other bots can be created to be controlled by this bot.
supports_guest_queries: Option<bool>Bots only — true if the bot supports guest queries from chats it is not a member of.
Returned only in getMe.
supports_join_request_queries: Option<bool>Bots only — true if the bot supports join request queries and can be assigned to
process them. Returned only in getMe.