retrieveMemberByIdOrNull

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

Deprecated

Moved to the BotCommands-jda-ktx module You can find & replace: Find: io.github.freya022.botcommands.api.core.utils.retrieveMemberByIdOrNull Replace: dev.freya02.botcommands.jda.ktx.retrieve.retrieveMemberByIdOrNull

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