pub struct ChatBuilder { /* private fields */ }Expand description
Builder for the Chat structure
Implementations§
Source§impl ChatBuilder
impl ChatBuilder
Sourcepub fn new(id: i64, _type: ChatType) -> Self
pub fn new(id: i64, _type: ChatType) -> Self
Instantiate the builder with the fields id, _type, title, username, first_name, last_name, is_forum, photo, active_usernames, emoji_status_custom_emoji_id, bio, has_private_forwards, has_restricted_voice_and_video_messages, join_to_send_messages, join_by_request, description, invite_link, pinned_message, permissions, slow_mode_delay, message_auto_delete_time, has_aggressive_anti_spam_enabled, has_hidden_members, has_protected_content, sticker_set_name, can_set_sticker_set, linked_chat_id, location
Sourcepub fn first_name(self, val: String) -> Self
pub fn first_name(self, val: String) -> Self
Set the field first_name to the given value
Sourcepub fn active_usernames(self, val: Vec<String>) -> Self
pub fn active_usernames(self, val: Vec<String>) -> Self
Set the field active_usernames to the given value
Sourcepub fn emoji_status_custom_emoji_id(self, val: String) -> Self
pub fn emoji_status_custom_emoji_id(self, val: String) -> Self
Set the field emoji_status_custom_emoji_id to the given value
Sourcepub fn has_private_forwards(self, val: bool) -> Self
pub fn has_private_forwards(self, val: bool) -> Self
Set the field has_private_forwards to the given value
Sourcepub fn has_restricted_voice_and_video_messages(self, val: bool) -> Self
pub fn has_restricted_voice_and_video_messages(self, val: bool) -> Self
Set the field has_restricted_voice_and_video_messages to the given value
Sourcepub fn join_to_send_messages(self, val: bool) -> Self
pub fn join_to_send_messages(self, val: bool) -> Self
Set the field join_to_send_messages to the given value
Sourcepub fn join_by_request(self, val: bool) -> Self
pub fn join_by_request(self, val: bool) -> Self
Set the field join_by_request to the given value
Sourcepub fn description(self, val: String) -> Self
pub fn description(self, val: String) -> Self
Set the field description to the given value
Sourcepub fn invite_link(self, val: String) -> Self
pub fn invite_link(self, val: String) -> Self
Set the field invite_link to the given value
Sourcepub fn pinned_message(self, val: Box<Message>) -> Self
pub fn pinned_message(self, val: Box<Message>) -> Self
Set the field pinned_message to the given value
Sourcepub fn permissions(self, val: ChatPermissions) -> Self
pub fn permissions(self, val: ChatPermissions) -> Self
Set the field permissions to the given value
Sourcepub fn slow_mode_delay(self, val: i64) -> Self
pub fn slow_mode_delay(self, val: i64) -> Self
Set the field slow_mode_delay to the given value
Sourcepub fn message_auto_delete_time(self, val: i64) -> Self
pub fn message_auto_delete_time(self, val: i64) -> Self
Set the field message_auto_delete_time to the given value
Sourcepub fn has_aggressive_anti_spam_enabled(self, val: bool) -> Self
pub fn has_aggressive_anti_spam_enabled(self, val: bool) -> Self
Set the field has_aggressive_anti_spam_enabled to the given value
Set the field has_hidden_members to the given value
Sourcepub fn has_protected_content(self, val: bool) -> Self
pub fn has_protected_content(self, val: bool) -> Self
Set the field has_protected_content to the given value
Sourcepub fn sticker_set_name(self, val: String) -> Self
pub fn sticker_set_name(self, val: String) -> Self
Set the field sticker_set_name to the given value
Sourcepub fn can_set_sticker_set(self, val: bool) -> Self
pub fn can_set_sticker_set(self, val: bool) -> Self
Set the field can_set_sticker_set to the given value
Sourcepub fn linked_chat_id(self, val: i64) -> Self
pub fn linked_chat_id(self, val: i64) -> Self
Set the field linked_chat_id to the given value
Sourcepub fn location(self, val: ChatLocation) -> Self
pub fn location(self, val: ChatLocation) -> Self
Set the field location to the given value