pub async fn load_current(mut self) -> Result<Self, InvocationError> {
        let s = self.inner_mut();
        if let Some(chan) = s.chat.try_to_input_channel() {
            let tl::enums::channels::ChannelParticipant::Participant(user) = s
                .client
                .invoke(&tl::functions::channels::GetParticipant {
                    channel: chan,
                    participant: s.peer.clone(),
                })
                .await?;
            match user.participant {
                tl::enums::ChannelParticipant::Banned(u) => {
                    s.rights = u.banned_rights.into();
                }
                _ => (),
            }
        }

        Ok(self)
    }
/// Load the current rights of the user. This lets you trivially grant or take away specific
/// permissions without changing any of the previous ones.
Load the current rights of the user. This lets you trivially grant or take away specific
permissions without changing any of the previous ones.
Load the current rights of the user . This lets you trivially grant or take away specific permissions without changing any of the previous ones .
pub async fn load_current(mut self) -> Result<Self, InvocationError> {
        let s = self.inner_mut();
        if let Some(chan) = s.chat.try_to_input_channel() {
            let tl::enums::channels::ChannelParticipant::Participant(user) = s
                .client
                .invoke(&tl::functions::channels::GetParticipant {
                    channel: chan,
                    participant: s.peer.clone(),
                })
                .await?;
            match user.participant {
                tl::enums::ChannelParticipant::Banned(u) => {
                    s.rights = u.banned_rights.into();
                }
                _ => (),
            }
        }
        Ok(self)
    }
pub async fn load_current ( mut self ) -> Result < Self , InvocationError > { let s = self . inner_mut ( ) ; if let Some ( chan ) = s . chat . try_to_input_channel ( ) { let tl :: enums :: channels :: ChannelParticipant :: Participant ( user ) = s . client . invoke ( & tl :: functions :: channels :: GetParticipant { channel : chan , participant : s . peer . clone ( ) , } ) . await ? ; match user . participant { tl :: enums :: ChannelParticipant :: Banned ( u ) => { s . rights = u . banned_rights . into ( ) ; } _ => ( ) , } } Ok ( self ) }
Load the current rights of the user.
Load the current rights of the user .
mut self
mut self