getRoleOrNull

open suspend override fun getRoleOrNull(guildId: Snowflake, roleId: Snowflake): Role?(source)

Requests the Role with the given roleId in the Guild wit the given guildId, returns null when the role isn't present.

Throws

RequestException

if something went wrong while retrieving the role.