Struct teloxide_core::payloads::PromoteChatMember [−][src]
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: ChatId
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
is_anonymous: Option<bool>
Pass True, if the administrator’s presence in the chat is hidden
can_manage_chat: Option<bool>
Pass True, if 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_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_manage_voice_chats: Option<bool>
Pass True, if the administrator can manage voice chats, supergroups only
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 their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
Implementations
impl PromoteChatMember
[src]
Trait Implementations
impl Clone for PromoteChatMember
[src]
fn clone(&self) -> PromoteChatMember
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PromoteChatMember
[src]
impl Eq for PromoteChatMember
[src]
impl Hash for PromoteChatMember
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PromoteChatMember> for PromoteChatMember
[src]
fn eq(&self, other: &PromoteChatMember) -> bool
[src]
fn ne(&self, other: &PromoteChatMember) -> bool
[src]
impl Payload for PromoteChatMember
[src]
impl Serialize for PromoteChatMember
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for PromoteChatMember
[src]
impl StructuralPartialEq for PromoteChatMember
[src]
Auto Trait Implementations
impl RefUnwindSafe for PromoteChatMember
impl Send for PromoteChatMember
impl Sync for PromoteChatMember
impl Unpin for PromoteChatMember
impl UnwindSafe for PromoteChatMember
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,