|
@@ -33,12 +33,21 @@ namespace Discord.WebSocket |
|
|
/// <inheritdoc/> |
|
|
/// <inheritdoc/> |
|
|
public IReadOnlyCollection<string> KeywordFilter { get; private set; } |
|
|
public IReadOnlyCollection<string> KeywordFilter { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
|
|
|
public IReadOnlyCollection<string> RegexPatterns { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
|
|
|
public IReadOnlyCollection<string> AllowList { get; private set; } |
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
/// <inheritdoc/> |
|
|
public IReadOnlyCollection<KeywordPresetTypes> Presets { get; private set; } |
|
|
public IReadOnlyCollection<KeywordPresetTypes> Presets { get; private set; } |
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
/// <inheritdoc/> |
|
|
public IReadOnlyCollection<AutoModRuleAction> Actions { get; private set; } |
|
|
public IReadOnlyCollection<AutoModRuleAction> Actions { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
|
|
|
public int MentionTotalLimit { get; private set; } |
|
|
|
|
|
|
|
|
/// <inheritdoc/> |
|
|
/// <inheritdoc/> |
|
|
public bool Enabled { get; private set; } |
|
|
public bool Enabled { get; private set; } |
|
|
|
|
|
|
|
@@ -80,6 +89,9 @@ namespace Discord.WebSocket |
|
|
TriggerType = model.TriggerType; |
|
|
TriggerType = model.TriggerType; |
|
|
KeywordFilter = model.TriggerMetadata.KeywordFilter.ToImmutableArray(); |
|
|
KeywordFilter = model.TriggerMetadata.KeywordFilter.ToImmutableArray(); |
|
|
Presets = model.TriggerMetadata.Presets.ToImmutableArray(); |
|
|
Presets = model.TriggerMetadata.Presets.ToImmutableArray(); |
|
|
|
|
|
RegexPatterns = model.TriggerMetadata.RegexPatterns.ToImmutableArray(); |
|
|
|
|
|
AllowList = model.TriggerMetadata.AllowList.ToImmutableArray(); |
|
|
|
|
|
MentionTotalLimit = model.TriggerMetadata.MentionLimit; |
|
|
Actions = model.Actions.Select(x => new AutoModRuleAction(x.Type, x.Metadata.GetValueOrDefault()?.ChannelId.ToNullable(), x.Metadata.GetValueOrDefault()?.DurationSeconds.ToNullable())).ToImmutableArray(); |
|
|
Actions = model.Actions.Select(x => new AutoModRuleAction(x.Type, x.Metadata.GetValueOrDefault()?.ChannelId.ToNullable(), x.Metadata.GetValueOrDefault()?.DurationSeconds.ToNullable())).ToImmutableArray(); |
|
|
Enabled = model.Enabled; |
|
|
Enabled = model.Enabled; |
|
|
ExemptRoles = model.ExemptRoles.Select(x => Guild.GetRole(x)).ToImmutableArray(); |
|
|
ExemptRoles = model.ExemptRoles.Select(x => Guild.GetRole(x)).ToImmutableArray(); |
|
|