pub struct ChatMemberRestricted {Show 17 fields
pub user: User,
pub can_add_web_page_previews: bool,
pub can_change_info: bool,
pub can_invite_users: bool,
pub can_manage_topics: bool,
pub can_pin_messages: Option<bool>,
pub can_send_audios: Option<bool>,
pub can_send_documents: Option<bool>,
pub can_send_messages: bool,
pub can_send_other_messages: bool,
pub can_send_photos: Option<bool>,
pub can_send_polls: bool,
pub can_send_video_notes: Option<bool>,
pub can_send_videos: Option<bool>,
pub can_send_voice_notes: Option<bool>,
pub is_member: bool,
pub until_date: Integer,
}Expand description
Represents a restricted user.
Fields§
§user: UserInformation about the user.
can_add_web_page_previews: boolIndicates whether the user may add web page previews to his messages.
can_change_info: boolIndicates whether the user allowed to change the chat title, photo and other settings.
can_invite_users: boolIndicates whether the user allowed to invite new users to the chat.
can_manage_topics: boolIndicates whether the user is allowed to create forum topics.
can_pin_messages: Option<bool>Indicates whether the user allowed to pin messages; groups and supergroups only.
can_send_audios: Option<bool>Indicates whether the user is allowed to send audios.
can_send_documents: Option<bool>Indicates whether the user is allowed to send documents.
can_send_messages: boolIndicates whether the user can send text messages, contacts, locations and venues.
can_send_other_messages: boolIndicates whether the user can send animations, games, stickers and use inline bots.
can_send_photos: Option<bool>Indicates whether the user is allowed to send photos.
can_send_polls: boolIndicates whether the user is allowed to send polls.
can_send_video_notes: Option<bool>Indicates whether the user is allowed to send video notes.
can_send_videos: Option<bool>Indicates whether the user is allowed to send videos.
can_send_voice_notes: Option<bool>Indicates whether the user is allowed to send voice notes.
is_member: boolIndicates whether the user is a member of the chat at the moment of the request.
until_date: IntegerDate when restrictions will be lifted for this user; unix time.
Implementations§
Source§impl ChatMemberRestricted
impl ChatMemberRestricted
Sourcepub fn new(user: User, until_date: Integer) -> Self
pub fn new(user: User, until_date: Integer) -> Self
Creates a new ChatMemberRestricted
§Arguments
user- Information about the user.until_date- Date when restrictions will be lifted for this user; unix time.
Sourcepub fn with_can_add_web_page_previews(self, value: bool) -> Self
pub fn with_can_add_web_page_previews(self, value: bool) -> Self
Sets a new value for the can_add_web_page_previews flag.
§Arguments
value- Indicates whether the user may add web page previews to his messages.
Sourcepub fn with_can_change_info(self, value: bool) -> Self
pub fn with_can_change_info(self, value: bool) -> Self
Sets a new value for the can_change_info flag.
§Arguments
value- Indicates whether the user allowed to change the chat title, photo and other settings.
Sourcepub fn with_can_invite_users(self, value: bool) -> Self
pub fn with_can_invite_users(self, value: bool) -> Self
Sets a new value for the can_invite_users flag.
§Arguments
value- Indicates whether the user allowed to invite new users to the chat.
Sourcepub fn with_can_manage_topics(self, value: bool) -> Self
pub fn with_can_manage_topics(self, value: bool) -> Self
Sets a new value for the can_manage_topics flag.
§Arguments
value- Indicates whether the user is allowed to create forum topics.
Sourcepub fn with_can_pin_messages(self, value: bool) -> Self
pub fn with_can_pin_messages(self, value: bool) -> Self
Sets a new value for the can_pin_messages flag.
§Arguments
value- Indicates whether the user allowed to pin messages; groups and supergroups only.
Sourcepub fn with_can_send_audios(self, value: bool) -> Self
pub fn with_can_send_audios(self, value: bool) -> Self
Sets a new value for the can_send_audios flag.
§Arguments
value- Indicates whether the user is allowed to send audios.
Sourcepub fn with_can_send_documents(self, value: bool) -> Self
pub fn with_can_send_documents(self, value: bool) -> Self
Sets a new value for the can_send_documents flag.
§Arguments
value- Indicates whether the user is allowed to send documents.
Sourcepub fn with_can_send_messages(self, value: bool) -> Self
pub fn with_can_send_messages(self, value: bool) -> Self
Sets a new value for the can_send_messages flag.
§Arguments
value- Indicates whether the user can send text messages, contacts, locations and venues.
Sourcepub fn with_can_send_other_messages(self, value: bool) -> Self
pub fn with_can_send_other_messages(self, value: bool) -> Self
Sets a new value for the can_send_other_messages flag.
§Arguments
value- Indicates whether the user can send animations, games, stickers and use inline bots.
Sourcepub fn with_can_send_photos(self, value: bool) -> Self
pub fn with_can_send_photos(self, value: bool) -> Self
Sets a new value for the can_send_photos flag.
§Arguments
value- Indicates whether the user is allowed to send photos.
Sourcepub fn with_can_send_polls(self, value: bool) -> Self
pub fn with_can_send_polls(self, value: bool) -> Self
Sets a new value for the can_send_polls flag.
§Arguments
value- Indicates whether the user is allowed to send polls.
Sourcepub fn with_can_send_video_notes(self, value: bool) -> Self
pub fn with_can_send_video_notes(self, value: bool) -> Self
Sets a new value for the can_send_video_notes flag.
§Arguments
value- Indicates whether the user is allowed to send video notes.
Sourcepub fn with_can_send_videos(self, value: bool) -> Self
pub fn with_can_send_videos(self, value: bool) -> Self
Sets a new value for the can_send_videos flag.
§Arguments
value- Indicates whether the user is allowed to send videos.
Sourcepub fn with_can_send_voice_notes(self, value: bool) -> Self
pub fn with_can_send_voice_notes(self, value: bool) -> Self
Sets a new value for the can_send_voice_notes flag.
§Arguments
value- Indicates whether the user is allowed to send voice notes.
Sourcepub fn with_is_member(self, value: bool) -> Self
pub fn with_is_member(self, value: bool) -> Self
Sets a new value for the is_member flag.
§Arguments
value- Indicates whether the user is a member of the chat at the moment of the request.
Trait Implementations§
Source§impl Clone for ChatMemberRestricted
impl Clone for ChatMemberRestricted
Source§fn clone(&self) -> ChatMemberRestricted
fn clone(&self) -> ChatMemberRestricted
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more