SpamAutoModerationRuleBuilder

Properties

Link copied to clipboard

The actions which will execute when the rule is triggered.

Link copied to clipboard
abstract var enabled: Boolean?

Whether the rule is enabled (false by default).

Link copied to clipboard
abstract val eventType: AutoModerationRuleEventType?

The rule event type.

Link copied to clipboard
abstract var exemptChannels: MutableList<Snowflake>?

The IDs of the channels that should not be affected by the rule (maximum of 50).

Link copied to clipboard
abstract var exemptRoles: MutableList<Snowflake>?

The IDs of the roles that should not be affected by the rule (maximum of 20).

Link copied to clipboard
abstract val name: String?

The rule name.

Link copied to clipboard
abstract var reason: String?

The reason for this request, this will be displayed in the audit log.

Link copied to clipboard
open override val triggerType: AutoModerationRuleTriggerType.Spam

The rule trigger type.

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun assignEventType(eventType: AutoModerationRuleEventType)
Link copied to clipboard
abstract fun assignName(name: String)

Use this to set name for AutoModerationRuleBuilder.

Link copied to clipboard

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

Link copied to clipboard
fun AutoModerationRuleBuilder.exemptChannel(channelId: Snowflake)

Exempt a channel from being affected by the rule (maximum of 50).

Link copied to clipboard
fun AutoModerationRuleBuilder.exemptRole(roleId: Snowflake)

Exempt a role from being affected by the rule (maximum of 20).

Link copied to clipboard

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