Table of Contents

Method TryGetMemberAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

TryGetMemberAsync(ulong, bool)

Gets a member of this guild by their user ID.

public Task<DiscordMember?> TryGetMemberAsync(ulong userId, bool fetch = false)

Parameters

userId ulong

ID of the member to get.

fetch bool

Whether to fetch the member from the api prior to cache.

Returns

Task<DiscordMember>

The requested DiscordMember if the member was found, otherwise null.

Exceptions

ServerErrorException

Thrown when Discord is unable to process the request.