blockMessage

Add a BlockMessage action which will execute whenever the rule is triggered.


Deprecated

Not all Auto Moderation Rules can have a 'BlockMessage' action (e.g. 'MemberProfile' rules can't), so this extension function is deprecated for 'AutoModerationRuleBuilder'. Use the extension function on 'BlockMessageAutoModerationRuleBuilder' instead. The deprecation level will be raised to ERROR in 0.16.0, to HIDDEN in 0.17.0, and this declaration will be removed in 0.18.0.

Replace with

import dev.kord.rest.builder.automoderation.BlockMessageAutoModerationRuleBuilder
import dev.kord.rest.builder.automoderation.blockMessage
import kotlin.Unit
(this as? BlockMessageAutoModerationRuleBuilder)?.blockMessage { builder() } ?: Unit

Add a BlockMessage action which will execute whenever the rule is triggered.