pub struct ChatMemberAdministrator {Show 18 fields
pub user: User,
pub can_be_edited: bool,
pub can_change_info: bool,
pub can_delete_messages: bool,
pub can_delete_stories: Option<bool>,
pub can_edit_messages: Option<bool>,
pub can_edit_stories: Option<bool>,
pub can_invite_users: bool,
pub can_manage_chat: bool,
pub can_manage_topics: Option<bool>,
pub can_manage_video_chats: bool,
pub can_pin_messages: Option<bool>,
pub can_post_messages: Option<bool>,
pub can_post_stories: Option<bool>,
pub can_promote_members: bool,
pub can_restrict_members: bool,
pub custom_title: Option<String>,
pub is_anonymous: bool,
}
Expand description
Represents a chat administrator.
Fields§
§user: User
Information about the user.
can_be_edited: bool
Indicates whether a bot is allowed to edit administrator privileges of that user.
can_change_info: bool
Indicates whether the administrator can change the chat title, photo and other settings.
can_delete_messages: bool
Indicates whether the administrator can delete messages of other users.
can_delete_stories: Option<bool>
Indicates whether the administrator can delete stories posted by other users; channels only.
can_edit_messages: Option<bool>
Indicates whether the administrator can edit messages of other users and can pin messages; channels only.
can_edit_stories: Option<bool>
Indicates whether the administrator can edit stories posted by other users; channels only.
can_invite_users: bool
Indicates whether the administrator can invite new users to the chat.
can_manage_chat: bool
Indicates whether the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode; implied by any other administrator privilege.
can_manage_topics: Option<bool>
Indicates whether the administrator is allowed to create, rename, close, and reopen forum topics; supergroups only.
can_manage_video_chats: bool
Indicates whether the administrator can manage video chats.
can_pin_messages: Option<bool>
Indicates whether the administrator can pin messages; groups and supergroups only.
can_post_messages: Option<bool>
Indicates whether the administrator can post in the channel; channels only.
can_post_stories: Option<bool>
Indicates whether the administrator can post stories in the channel; channels only.
can_promote_members: bool
Indicates whether the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user).
can_restrict_members: bool
Indicates whether the administrator can restrict, ban or unban chat members.
custom_title: Option<String>
Custom title for the administrator.
is_anonymous: bool
Indicates whether the administrator’s presence in the chat is hidden.
Implementations§
Source§impl ChatMemberAdministrator
impl ChatMemberAdministrator
Sourcepub fn with_can_be_edited(self, value: bool) -> Self
pub fn with_can_be_edited(self, value: bool) -> Self
Sets a new value for the can_be_edited
flag.
§Arguments
value
- Indicates whether a bot is allowed to edit privileges of that administrator.
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 administrator can change the chat title, photo and other settings.
Sourcepub fn with_can_delete_messages(self, value: bool) -> Self
pub fn with_can_delete_messages(self, value: bool) -> Self
Sets a new value for the can_delete_messages
flag.
§Arguments
value
- Indicates whether the administrator can delete messages of other users.
Sourcepub fn with_can_delete_stories(self, value: bool) -> Self
pub fn with_can_delete_stories(self, value: bool) -> Self
Sets a new value for the can_delete_stories
flag.
§Arguments
value
- Indicates whether the administrator can delete stories posted by other users; channels only.
Sourcepub fn with_can_edit_messages(self, value: bool) -> Self
pub fn with_can_edit_messages(self, value: bool) -> Self
Sets a new value for the can_edit_messages
flag.
§Arguments
value
- Indicates whether the administrator can edit messages of other users and can pin messages; channels only.
Sourcepub fn with_can_edit_stories(self, value: bool) -> Self
pub fn with_can_edit_stories(self, value: bool) -> Self
Sets a new value for the can_edit_stories
flag.
§Arguments
value
- Indicates whether the administrator can edit stories posted by other users; channels only.
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 administrator can invite new users to the chat.
Sourcepub fn with_can_manage_chat(self, value: bool) -> Self
pub fn with_can_manage_chat(self, value: bool) -> Self
Sets a new value for the can_manage_chat
flag.
§Arguments
value
- Indicates whether the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode; implied by any other administrator privilege.
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 administrator is allowed to create, rename, close, and reopen forum topics; supergroups only.
Sourcepub fn with_can_manage_video_chats(self, value: bool) -> Self
pub fn with_can_manage_video_chats(self, value: bool) -> Self
Sets a new value for the can_manage_video_chats
flag.
§Arguments
value
- Indicates whether the administrator can manage video chats.
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 administrator can pin messages; groups and supergroups only.
Sourcepub fn with_can_post_messages(self, value: bool) -> Self
pub fn with_can_post_messages(self, value: bool) -> Self
Sets a new value for the can_post_messages
flag.
§Arguments
value
- Indicates whether the administrator can post in the channel; channels only.
Sourcepub fn with_can_post_stories(self, value: bool) -> Self
pub fn with_can_post_stories(self, value: bool) -> Self
Sets a new value for the can_post_stories
flag.
§Arguments
value
- Indicates whether the administrator can post stories in the channel; channels only.
Sourcepub fn with_can_promote_members(self, value: bool) -> Self
pub fn with_can_promote_members(self, value: bool) -> Self
Sets a new value for the can_promote_members
flag.
§Arguments
value
- Indicates whether the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user).
Sourcepub fn with_can_restrict_members(self, value: bool) -> Self
pub fn with_can_restrict_members(self, value: bool) -> Self
Sets a new value for the can_restrict_members
flag.
§Arguments
value
- Indicates whether the administrator can restrict, ban or unban chat members.
Sourcepub fn with_custom_title<T>(self, value: T) -> Self
pub fn with_custom_title<T>(self, value: T) -> Self
Sourcepub fn with_is_anonymous(self, value: bool) -> Self
pub fn with_is_anonymous(self, value: bool) -> Self
Sets a new value for the is_anonymous
flag.
§Arguments
value
- Indicates whether the administrator’s presence in the chat is hidden.
Trait Implementations§
Source§impl Clone for ChatMemberAdministrator
impl Clone for ChatMemberAdministrator
Source§fn clone(&self) -> ChatMemberAdministrator
fn clone(&self) -> ChatMemberAdministrator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more