retrieveMemberOrNull

suspend fun Guild.retrieveMemberOrNull(user: UserSnowflake, useCache: Boolean = true): Member?(source)

Retrieves a Member with the provided User.

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

Parameters

user

The user to retrieve the member for

useCache

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

See also


suspend fun Guild.retrieveMemberOrNull(userId: Long): Member?(source)

Deprecated

Replaced with retrieveMemberByIdOrNull

Replace with

retrieveMemberByIdOrNull(userId)