Table of Contents

Interface IAutoModRule

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a auto mod rule within a guild.

public interface IAutoModRule : ISnowflakeEntity, IEntity<ulong>, IDeletable
Inherited Members

Properties

Actions

Gets a collection of actions that will be preformed if a user breaks this rule.

IReadOnlyCollection<AutoModRuleAction> Actions { get; }

Property Value

IReadOnlyCollection<AutoModRuleAction>

AllowList

Gets the allow list patterns for this rule. Empty if the rule has no allowed terms.

IReadOnlyCollection<string> AllowList { get; }

Property Value

IReadOnlyCollection<string>

Remarks

This collection will be empty if TriggerType is not Keyword.

CreatorId

Gets the id of the user who created this use.

ulong CreatorId { get; }

Property Value

ulong

Enabled

Gets whether or not this rule is enabled.

bool Enabled { get; }

Property Value

bool

EventType

Gets the event type on which this rule is triggered.

AutoModEventType EventType { get; }

Property Value

AutoModEventType

ExemptChannels

Gets a collection of channel ids that are exempt from this rule. Empty if the rule has no exempt channels.

IReadOnlyCollection<ulong> ExemptChannels { get; }

Property Value

IReadOnlyCollection<ulong>

ExemptRoles

Gets a collection of role ids that are exempt from this rule. Empty if the rule has no exempt roles.

IReadOnlyCollection<ulong> ExemptRoles { get; }

Property Value

IReadOnlyCollection<ulong>

GuildId

Gets the guild id on which this rule exists.

ulong GuildId { get; }

Property Value

ulong

KeywordFilter

Gets the keyword filter for this rule.

IReadOnlyCollection<string> KeywordFilter { get; }

Property Value

IReadOnlyCollection<string>

Remarks

This collection will be empty if TriggerType is not Keyword.

MentionTotalLimit

Gets the total mention limit for this rule.

int? MentionTotalLimit { get; }

Property Value

int?

Remarks

This property will be null if TriggerType is not MentionSpam.

Name

Get the name of this rule.

string Name { get; }

Property Value

string

Presets

Gets the preset keyword types for this rule. Empty if the rule has no presets.

IReadOnlyCollection<KeywordPresetTypes> Presets { get; }

Property Value

IReadOnlyCollection<KeywordPresetTypes>

Remarks

This collection will be empty if TriggerType is not KeywordPreset.

RegexPatterns

Gets regex patterns for this rule. Empty if the rule has no regexes.

IReadOnlyCollection<string> RegexPatterns { get; }

Property Value

IReadOnlyCollection<string>

Remarks

This collection will be empty if TriggerType is not Keyword.

TriggerType

Gets the trigger type on which this rule executes.

AutoModTriggerType TriggerType { get; }

Property Value

AutoModTriggerType

Methods

ModifyAsync(Action<AutoModRuleProperties>, RequestOptions)

Modifies this rule.

Task ModifyAsync(Action<AutoModRuleProperties> func, RequestOptions options = null)

Parameters

func Action<AutoModRuleProperties>

The delegate containing the properties to modify the rule with.

options RequestOptions

The options to be used when sending the request.

Returns

Task