Skip to main content

MemberExt

Trait MemberExt 

Source
pub trait MemberExt {
    // Required methods
    fn ban<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
        reason: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<ServerBan>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn edit(&self, http: impl AsRef<HttpClient>) -> EditMemberBuilder;
    fn kick<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_roles<'life0, 'life1, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
        roles: &'life1 [Role],
    ) -> Pin<Box<dyn Future<Output = Result<Member>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn voice(
        &self,
        cache: impl AsRef<GlobalCache>,
    ) -> Option<(Channel, UserVoiceState)>;
    fn mention(&self) -> String;
}

Required Methods§

Source

fn ban<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, reason: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ServerBan>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Bans a member from its server.

Source

fn edit(&self, http: impl AsRef<HttpClient>) -> EditMemberBuilder

Edits a member.

Source

fn kick<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Kicks a member from its server.

Source

fn add_roles<'life0, 'life1, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, roles: &'life1 [Role], ) -> Pin<Box<dyn Future<Output = Result<Member>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Bans a member from its server.

Source

fn voice( &self, cache: impl AsRef<GlobalCache>, ) -> Option<(Channel, UserVoiceState)>

Gets the current voice channel and user voice state for a member if they are connected to a voice channel in this server

Source

fn mention(&self) -> String

Formats a user mention for the member.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§