ModerationRule class

Constructors

ModerationRule({required Snowflake id, required Snowflake guildId, required Guild guild, required String label, required ModerationEventType eventType, required List<ModerationAction> actions, required ModerationTriggerType triggerType, required ModerationTriggerMetadata triggerMetadata, required bool enabled, required List<Role> exemptRoles, required List<GuildChannel> exemptChannels})
ModerationRule.fromPayload(dynamic payload)
factory

Properties

actions List<ModerationAction>
getter/setter pair
enabled bool
getter/setter pair
eventType ModerationEventType
getter/setter pair
exemptChannels List<GuildChannel>
getter/setter pair
exemptRoles List<Role>
getter/setter pair
guild Guild
getter/setter pair
guildId Snowflake
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id Snowflake
getter/setter pair
label String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
triggerMetadata ModerationTriggerMetadata
getter/setter pair
triggerType ModerationTriggerType
getter/setter pair

Methods

delete() Future<bool>
Delete this
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setActions(List<ModerationAction> actions) Future<void>
Update actions of this
setEnabled(bool value) Future<void>
Update enabled of this
setEventType(ModerationEventType event) Future<void>
Update the event of this
setExemptChannels(List<GuildChannel> channels) Future<void>
Defines which roles will not be affected by this
setExemptRoles(List<Role> roles) Future<void>
Defines which roles will not be affected by this
setLabel(String label) Future<void>
Update the label of this
setTriggerMetadata(ModerationTriggerMetadata triggerMetadata) Future<void>
Update the trigger metadata of this
toString() String
A string representation of this object.
inherited

Operators

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