[][src]Struct twilight_http::request::guild::member::get_guild_members::GetGuildMembers

pub struct GetGuildMembers<'a> { /* fields omitted */ }

Get the members of a guild, by id.

The upper limit to this request is 1000. If more than 1000 members are needed, the requests must be chained. Discord defaults the limit to 1.

Examples

Get the first 500 members of guild 100 after user ID 3000:

use twilight_http::Client;
use twilight_model::id::{GuildId, UserId};

let client = Client::new("my token");

let guild_id = GuildId(100);
let user_id = UserId(3000);
let members = client.guild_members(guild_id).after(user_id).await?;

Errors

Returns GetGuildMembersError::LimitInvalid if the limit is invalid.

Implementations

impl<'a> GetGuildMembers<'a>[src]

pub fn after(self, after: UserId) -> Self[src]

Sets the user ID to get members after.

pub fn limit(self, limit: u64) -> Result<Self, GetGuildMembersError>[src]

Sets the number of members to retrieve per request.

The limit must be greater than 0 and less than 1000.

Errors

Returns GetGuildMembersError::LimitInvalid if the limit is 0 or greater than 1000.

pub fn presences(self, presences: bool) -> Self[src]

Sets whether to retrieve matched member presences

Trait Implementations

impl Future for GetGuildMembers<'_>[src]

type Output = Result<Vec<Member>>

The type of value produced on completion.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GetGuildMembers<'a>[src]

impl<'a> Send for GetGuildMembers<'a>[src]

impl<'a> !Sync for GetGuildMembers<'a>[src]

impl<'a> Unpin for GetGuildMembers<'a>[src]

impl<'a> !UnwindSafe for GetGuildMembers<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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