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({String? reason}) Future<bool>
Delete this
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setActions(List<ModerationAction> actions, {String? reason}) Future<void>
Update actions of this
setEnabled(bool value, {String? reason}) Future<void>
Update enabled of this
setEventType(ModerationEventType event, {String? reason}) Future<void>
Update the event of this
setExemptChannels(List<GuildChannel> channels, {String? reason}) Future<void>
Defines which roles will not be affected by this
setExemptRoles(List<Role> roles, {String? reason}) Future<void>
Defines which roles will not be affected by this
setLabel(String label, {String? reason}) Future<void>
Update the label of this
setTriggerMetadata(ModerationTriggerMetadata triggerMetadata, {String? reason}) 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