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

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

Unique identifier of the target user

Pass True, if the administrator can change chat title, photo and other settings

Pass True, if the administrator can create channel posts, channels only

Pass True, if the administrator can edit messages of other users and can pin messages, channels only

Pass True, if the administrator can delete messages of other users

Pass True, if the administrator can invite new users to the chat

Pass True, if the administrator can restrict, ban or unban chat members

Pass True, if the administrator can pin messages, supergroups only

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]

Formats the value using the given formatter. Read more

impl Clone for PromoteChatMember
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for PromoteChatMember
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for PromoteChatMember
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations