asRoleOrNull

open suspend override fun asRoleOrNull(): Role(source)

Requests to get this behavior as a Role if its not an instance of a Role, returns null if the user isn't present.

Throws

RequestException

if anything went wrong during the request.