Struct tg_bot_models::PromoteChatMember [−][src]
pub struct PromoteChatMember { pub chat_id: PolymorphChatId, pub user_id: i64, pub can_change_info: Option<bool>, pub can_post_messages: Option<bool>, pub can_edit_messages: Option<bool>, pub can_delete_messages: Option<bool>, pub can_invite_users: Option<bool>, pub can_restrict_members: Option<bool>, pub can_pin_messages: Option<bool>, pub can_promote_members: Option<bool>, }
Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.
Fields
chat_id: PolymorphChatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
user_id: i64
Unique identifier of the target user
can_change_info: Option<bool>
Pass True, if the administrator can change chat title, photo and other settings
can_post_messages: Option<bool>
Pass True, if the administrator can create channel posts, channels only
can_edit_messages: Option<bool>
Pass True, if the administrator can edit messages of other users and can pin messages, channels only
can_delete_messages: Option<bool>
Pass True, if the administrator can delete messages of other users
can_invite_users: Option<bool>
Pass True, if the administrator can invite new users to the chat
can_restrict_members: Option<bool>
Pass True, if the administrator can restrict, ban or unban chat members
can_pin_messages: Option<bool>
Pass True, if the administrator can pin messages, supergroups only
can_promote_members: Option<bool>
Pass True, if 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 him)
Trait Implementations
impl Debug for PromoteChatMember
[src]
impl Debug for PromoteChatMember
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for PromoteChatMember
[src]
impl Clone for PromoteChatMember
fn clone(&self) -> PromoteChatMember
[src]
fn clone(&self) -> PromoteChatMember
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for PromoteChatMember
[src]
impl PartialEq for PromoteChatMember
fn eq(&self, other: &PromoteChatMember) -> bool
[src]
fn eq(&self, other: &PromoteChatMember) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PromoteChatMember) -> bool
[src]
fn ne(&self, other: &PromoteChatMember) -> bool
This method tests for !=
.
impl PartialOrd for PromoteChatMember
[src]
impl PartialOrd for PromoteChatMember
fn partial_cmp(&self, other: &PromoteChatMember) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &PromoteChatMember) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &PromoteChatMember) -> bool
[src]
fn lt(&self, other: &PromoteChatMember) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &PromoteChatMember) -> bool
[src]
fn le(&self, other: &PromoteChatMember) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &PromoteChatMember) -> bool
[src]
fn gt(&self, other: &PromoteChatMember) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &PromoteChatMember) -> bool
[src]
fn ge(&self, other: &PromoteChatMember) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Auto Trait Implementations
impl Send for PromoteChatMember
impl Send for PromoteChatMember
impl Sync for PromoteChatMember
impl Sync for PromoteChatMember