-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MentionRaidProtectionEnabled (#3056)
- Loading branch information
Showing
7 changed files
with
69 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,39 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Discord.API | ||
namespace Discord.API; | ||
|
||
internal class AutoModerationRule | ||
{ | ||
internal class AutoModerationRule | ||
{ | ||
[JsonProperty("id")] | ||
public ulong Id { get; set; } | ||
[JsonProperty("id")] | ||
public ulong Id { get; set; } | ||
|
||
[JsonProperty("guild_id")] | ||
public ulong GuildId { get; set; } | ||
[JsonProperty("guild_id")] | ||
public ulong GuildId { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("creator_id")] | ||
public ulong CreatorId { get; set; } | ||
[JsonProperty("creator_id")] | ||
public ulong CreatorId { get; set; } | ||
|
||
[JsonProperty("event_type")] | ||
public AutoModEventType EventType { get; set; } | ||
[JsonProperty("event_type")] | ||
public AutoModEventType EventType { get; set; } | ||
|
||
[JsonProperty("trigger_type")] | ||
public AutoModTriggerType TriggerType { get; set; } | ||
[JsonProperty("trigger_type")] | ||
public AutoModTriggerType TriggerType { get; set; } | ||
|
||
[JsonProperty("trigger_metadata")] | ||
public TriggerMetadata TriggerMetadata { get; set; } | ||
[JsonProperty("trigger_metadata")] | ||
public TriggerMetadata TriggerMetadata { get; set; } | ||
|
||
[JsonProperty("actions")] | ||
public AutoModAction[] Actions { get; set; } | ||
[JsonProperty("actions")] | ||
public AutoModAction[] Actions { get; set; } | ||
|
||
[JsonProperty("enabled")] | ||
public bool Enabled { get; set; } | ||
[JsonProperty("enabled")] | ||
public bool Enabled { get; set; } | ||
|
||
[JsonProperty("exempt_roles")] | ||
public ulong[] ExemptRoles { get; set; } | ||
[JsonProperty("exempt_roles")] | ||
public ulong[] ExemptRoles { get; set; } | ||
|
||
[JsonProperty("exempt_channels")] | ||
public ulong[] ExemptChannels { get; set; } | ||
} | ||
[JsonProperty("exempt_channels")] | ||
public ulong[] ExemptChannels { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Discord.API | ||
namespace Discord.API; | ||
|
||
internal class TriggerMetadata | ||
{ | ||
internal class TriggerMetadata | ||
{ | ||
[JsonProperty("keyword_filter")] | ||
public Optional<string[]> KeywordFilter { get; set; } | ||
[JsonProperty("keyword_filter")] | ||
public Optional<string[]> KeywordFilter { get; set; } | ||
|
||
[JsonProperty("regex_patterns")] | ||
public Optional<string[]> RegexPatterns { get; set; } | ||
|
||
[JsonProperty("regex_patterns")] | ||
public Optional<string[]> RegexPatterns { get; set; } | ||
[JsonProperty("presets")] | ||
public Optional<KeywordPresetTypes[]> Presets { get; set; } | ||
|
||
[JsonProperty("presets")] | ||
public Optional<KeywordPresetTypes[]> Presets { get; set; } | ||
[JsonProperty("allow_list")] | ||
public Optional<string[]> AllowList { get; set; } | ||
|
||
[JsonProperty("allow_list")] | ||
public Optional<string[]> AllowList { get; set; } | ||
[JsonProperty("mention_total_limit")] | ||
public Optional<int> MentionLimit { get; set; } | ||
|
||
[JsonProperty("mention_total_limit")] | ||
public Optional<int> MentionLimit { get; set; } | ||
} | ||
[JsonProperty("mention_raid_protection_enabled")] | ||
public Optional<bool> MentionRaidProtectionEnabled { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters