Struct botapi::gen_types::UserBuilder
source · pub struct UserBuilder { /* private fields */ }Expand description
This object represents a Telegram user or bot.
Implementations§
source§impl UserBuilder
impl UserBuilder
pub fn new(id: i64, is_bot: bool, first_name: String) -> Self
sourcepub fn set_id(self, id: i64) -> Self
pub fn set_id(self, id: i64) -> Self
Unique 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.
sourcepub fn set_is_bot(self, is_bot: bool) -> Self
pub fn set_is_bot(self, is_bot: bool) -> Self
True, if this user is a bot
sourcepub fn set_first_name(self, first_name: String) -> Self
pub fn set_first_name(self, first_name: String) -> Self
User’s or bot’s first name
sourcepub fn set_last_name(self, last_name: String) -> Self
pub fn set_last_name(self, last_name: String) -> Self
Optional. User’s or bot’s last name
sourcepub fn set_username(self, username: String) -> Self
pub fn set_username(self, username: String) -> Self
Optional. User’s or bot’s username
sourcepub fn set_language_code(self, language_code: String) -> Self
pub fn set_language_code(self, language_code: String) -> Self
Optional. IETF language tag of the user’s language
Optional. True, if this user is a Telegram Premium user
Optional. True, if this user added the bot to the attachment menu
sourcepub fn set_can_join_groups(self, can_join_groups: bool) -> Self
pub fn set_can_join_groups(self, can_join_groups: bool) -> Self
Optional. True, if the bot can be invited to groups. Returned only in getMe.
sourcepub fn set_can_read_all_group_messages(
self,
can_read_all_group_messages: bool
) -> Self
pub fn set_can_read_all_group_messages(
self,
can_read_all_group_messages: bool
) -> Self
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
sourcepub fn set_supports_inline_queries(self, supports_inline_queries: bool) -> Self
pub fn set_supports_inline_queries(self, supports_inline_queries: bool) -> Self
Optional. True, if the bot supports inline queries. Returned only in getMe.
pub fn build(self) -> User
Trait Implementations§
source§impl Clone for UserBuilder
impl Clone for UserBuilder
source§fn clone(&self) -> UserBuilder
fn clone(&self) -> UserBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more