retrieveMemberByIdOrNull

suspend fun Guild.retrieveMemberByIdOrNull(userId: String, useCache: Boolean = true): Member?(source)
suspend fun Guild.retrieveMemberByIdOrNull(userId: Long, useCache: Boolean = true): Member?(source)

Retrieves a Member with the provided ID.

Throws the same exceptions as Guild.retrieveMemberById, minus ErrorResponse.UNKNOWN_MEMBER and ErrorResponse.UNKNOWN_USER.

Parameters

userId

The ID of the member to retrieve

useCache

Whether this should rely on the cache, set to false to always make a request.

See also