ModerationRulesBuilder class

Moderation rules of Guild

Constructors

ModerationRulesBuilder(String label, ModerationEventType moderationEventType, ModerationTriggerType moderationTriggerType, List<Snowflake> exemptRoles, List<Snowflake> exemptChannels, bool enabled, List<ModerationAction> actions, ModerationTriggerMetadata? triggerMetadata)
ModerationRulesBuilder.banKeywords({required String label, required List<ModerationAction> actions, required ModerationTriggerMetadata? triggerMetadata, List<Snowflake>? exemptRoles, List<Snowflake>? exemptChannels, bool enabled = true})
Create a new moderation rule for Guild that triggers when a user send a message with a blacklisted word.
factory
ModerationRulesBuilder.mentionSpam({required String label, required List<ModerationAction> actions, required ModerationTriggerMetadata? triggerMetadata, List<Snowflake>? exemptRoles, List<Snowflake>? exemptChannels, bool enabled = true})
Create a new moderation rule for Guild that triggers when a user MessageMention many users.
factory
ModerationRulesBuilder.spam({required String label, required List<ModerationAction> actions, List<Snowflake>? exemptRoles, List<Snowflake>? exemptChannels, bool enabled = true})
Create a new moderation rule for Guild that triggers when a user spam many messages.
factory

Properties

actions List<ModerationAction>
The actions of this.
final
enabled bool
Whether this is enabled.
final
exemptChannels List<Snowflake>
The channels that are exempt from this as Snowflake.
final
exemptRoles List<Snowflake>
The roles that are exempt from this as Snowflake.
final
hashCode int
The hash code for this object.
no setterinherited
label String
Label of this.
final
moderationEventType ModerationEventType
The ModerationEventType of event that triggers this.
final
moderationTriggerType ModerationTriggerType
The ModerationTriggerType of event that triggers this.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
triggerMetadata ModerationTriggerMetadata?
The metadata of this.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited