Method RequestMembersAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
RequestMembersAsync(string, int, bool?, IEnumerable<ulong>?, string?)
Requests that Discord send a list of guild members based on the specified arguments. This method will fire the GuildMembersChunked event.
If no arguments aside from presences
and nonce
are specified, this will request all guild members.
public Task RequestMembersAsync(string query = "", int limit = 0, bool? presences = null, IEnumerable<ulong>? userIds = null, string? nonce = null)
Parameters
query
stringFilters the returned members based on what the username starts with. Either this or
userIds
must not be null. Thelimit
must also be greater than 0 if this is specified.limit
intTotal number of members to request. This must be greater than 0 if
query
is specified.presences
bool?Whether to include the Presences associated with the fetched members.
userIds
IEnumerable<ulong>Whether to limit the request to the specified user ids. Either this or
query
must not be null.nonce
stringThe unique string to identify the response.
Returns
- Task