Struct twilight_http::request::guild::member::SearchGuildMembers
source · [−]pub struct SearchGuildMembers<'a> { /* private fields */ }
Expand description
Search the members of a specific guild by a query.
The upper limit to this request is 1000. Discord defaults the limit to 1.
Examples
Get the first 10 members of guild 100
matching Wumpus
:
use twilight_http::Client;
use twilight_model::id::Id;
let client = Client::new("my token".to_owned());
let guild_id = Id::new(100);
let members = client.search_guild_members(guild_id, "Wumpus")
.limit(10)?
.exec()
.await?;
Errors
Returns an error of type SearchGuildMembers
if the limit is 0 or greater
than 1000.
Implementations
Sets the number of members to retrieve per request.
The limit must be greater than 0 and less than 1000.
Errors
Returns an error of type SearchGuildMembers
if the limit is 0 or
greater than 1000.
pub fn exec(self) -> ResponseFuture<MemberListBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<MemberListBody>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Notable traits for ResponseFuture<T>
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SearchGuildMembers<'a>
impl<'a> Send for SearchGuildMembers<'a>
impl<'a> Sync for SearchGuildMembers<'a>
impl<'a> Unpin for SearchGuildMembers<'a>
impl<'a> !UnwindSafe for SearchGuildMembers<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more