Method GetMembersAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
GetMembersAsync(bool, ulong?, int?, CancellationToken)
Gets the members of a thread. Needs the GuildMembers intent.
public Task<IReadOnlyList<DiscordThreadChannelMember>> GetMembersAsync(bool withMember = false, ulong? after = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
withMemberboolWhether to request the member object. (If set to true, will paginate the result)
afterulong?Request all members after the specified. (Currently only utilized if withMember is set to true)
limitint?The amount of members to fetch. (Currently only utilized if withMember is set to true)
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- NotFoundException
Thrown when the thread does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.