ModerationRule class Null safety

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.from({required Guild guild, required dynamic payload})
factory

Properties

actions List<ModerationAction>
read / write
enabled bool
read / write
eventType ModerationEventType
read / write
exemptChannels List<GuildChannel>
read / write
exemptRoles List<Role>
read / write
guild Guild
read / write
guildId Snowflake
read / write
hashCode int
The hash code for this object.
read-only, inherited
id Snowflake
read / write
label String
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
triggerMetadata ModerationTriggerMetadata
read / write
triggerType ModerationTriggerType
read / write

Methods

delete() Future<bool>
Delete this
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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