blockMessage
inline fun BlockMessageAutoModerationRuleBuilder.blockMessage(builder: BlockMessageAutoModerationActionBuilder.() -> Unit = {})(source)
Add a BlockMessage action which will execute whenever the rule is triggered.
inline fun AutoModerationRuleBuilder.blockMessage(builder: BlockMessageAutoModerationActionBuilder.() -> Unit = {})(source)
Deprecated (with error)
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 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
Content copied to clipboard
(this as? BlockMessageAutoModerationRuleBuilder)?.blockMessage { builder() } ?: Unit
Content copied to clipboard
Add a BlockMessage action which will execute whenever the rule is triggered.