getAutoModerationRuleOrNull

open suspend override fun getAutoModerationRuleOrNull(guildId: Snowflake, ruleId: Snowflake): AutoModerationRule?(source)

Requests an AutoModerationRule by its id. Returns null if it wasn't found.

This requires the ManageGuild permission.

Throws

RequestException

if something went wrong during the request.