Skip to main content

CallPromoteChatMember

Struct CallPromoteChatMember 

Source
pub struct CallPromoteChatMember<'a, V> { /* private fields */ }

Implementations§

Source§

impl<'a, V: Into<ChatHandle> + Serialize> CallPromoteChatMember<'a, V>

Source

pub fn chat_id(self, chat_id: V) -> Self

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

Source

pub fn get_chat_id(&'a self) -> &'a V

Source

pub fn user_id(self, user_id: i64) -> Self

Unique identifier of the target user

Source

pub fn get_user_id(&'a self) -> &'a i64

Source

pub fn is_anonymous(self, is_anonymous: bool) -> Self

Pass True if the administrator’s presence in the chat is hidden

Source

pub fn get_is_anonymous(&'a self) -> &'a Option<bool>

Source

pub fn can_manage_chat(self, can_manage_chat: bool) -> Self

Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.

Source

pub fn get_can_manage_chat(&'a self) -> &'a Option<bool>

Source

pub fn can_delete_messages(self, can_delete_messages: bool) -> Self

Pass True if the administrator can delete messages of other users

Source

pub fn get_can_delete_messages(&'a self) -> &'a Option<bool>

Source

pub fn can_manage_video_chats(self, can_manage_video_chats: bool) -> Self

Pass True if the administrator can manage video chats

Source

pub fn get_can_manage_video_chats(&'a self) -> &'a Option<bool>

Source

pub fn can_restrict_members(self, can_restrict_members: bool) -> Self

Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators

Source

pub fn get_can_restrict_members(&'a self) -> &'a Option<bool>

Source

pub fn can_promote_members(self, can_promote_members: bool) -> Self

Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)

Source

pub fn get_can_promote_members(&'a self) -> &'a Option<bool>

Source

pub fn can_change_info(self, can_change_info: bool) -> Self

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

Source

pub fn get_can_change_info(&'a self) -> &'a Option<bool>

Source

pub fn can_invite_users(self, can_invite_users: bool) -> Self

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

Source

pub fn get_can_invite_users(&'a self) -> &'a Option<bool>

Source

pub fn can_post_stories(self, can_post_stories: bool) -> Self

Pass True if the administrator can post stories to the chat

Source

pub fn get_can_post_stories(&'a self) -> &'a Option<bool>

Source

pub fn can_edit_stories(self, can_edit_stories: bool) -> Self

Pass True if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat’s story archive

Source

pub fn get_can_edit_stories(&'a self) -> &'a Option<bool>

Source

pub fn can_delete_stories(self, can_delete_stories: bool) -> Self

Pass True if the administrator can delete stories posted by other users

Source

pub fn get_can_delete_stories(&'a self) -> &'a Option<bool>

Source

pub fn can_post_messages(self, can_post_messages: bool) -> Self

Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only

Source

pub fn get_can_post_messages(&'a self) -> &'a Option<bool>

Source

pub fn can_edit_messages(self, can_edit_messages: bool) -> Self

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

Source

pub fn get_can_edit_messages(&'a self) -> &'a Option<bool>

Source

pub fn can_pin_messages(self, can_pin_messages: bool) -> Self

Pass True if the administrator can pin messages; for supergroups only

Source

pub fn get_can_pin_messages(&'a self) -> &'a Option<bool>

Source

pub fn can_manage_topics(self, can_manage_topics: bool) -> Self

Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only

Source

pub fn get_can_manage_topics(&'a self) -> &'a Option<bool>

Source

pub fn can_manage_direct_messages( self, can_manage_direct_messages: bool, ) -> Self

Pass True if the administrator can manage direct messages within the channel and decline suggested posts; for channels only

Source

pub fn get_can_manage_direct_messages(&'a self) -> &'a Option<bool>

Source

pub fn can_manage_tags(self, can_manage_tags: bool) -> Self

Pass True if the administrator can edit the tags of regular members; for groups and supergroups only

Source

pub fn get_can_manage_tags(&'a self) -> &'a Option<bool>

Source

pub async fn build(self) -> BotResult<bool>

Auto Trait Implementations§

§

impl<'a, V> Freeze for CallPromoteChatMember<'a, V>
where V: Freeze,

§

impl<'a, V> !RefUnwindSafe for CallPromoteChatMember<'a, V>

§

impl<'a, V> Send for CallPromoteChatMember<'a, V>
where V: Send,

§

impl<'a, V> Sync for CallPromoteChatMember<'a, V>
where V: Sync,

§

impl<'a, V> Unpin for CallPromoteChatMember<'a, V>
where V: Unpin,

§

impl<'a, V> UnsafeUnpin for CallPromoteChatMember<'a, V>
where V: UnsafeUnpin,

§

impl<'a, V> !UnwindSafe for CallPromoteChatMember<'a, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more