From 8db4c7c2d17a10202b808254283ea63b24389d18 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Thu, 21 Sep 2023 23:19:07 +0200 Subject: [PATCH 1/3] Update ApplicationCommandEqualityChecks.cs Signed-off-by: Lala Sabathil --- .../ApplicationCommandEqualityChecks.cs | 200 +++++++++++------- 1 file changed, 121 insertions(+), 79 deletions(-) diff --git a/DisCatSharp.ApplicationCommands/Checks/ApplicationCommandEqualityChecks.cs b/DisCatSharp.ApplicationCommands/Checks/ApplicationCommandEqualityChecks.cs index 70279c949..f8310b6cf 100644 --- a/DisCatSharp.ApplicationCommands/Checks/ApplicationCommandEqualityChecks.cs +++ b/DisCatSharp.ApplicationCommands/Checks/ApplicationCommandEqualityChecks.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Linq; @@ -11,6 +10,9 @@ namespace DisCatSharp.ApplicationCommands.Checks; +/// +/// The application command equality checks. +/// internal static class ApplicationCommandEqualityChecks { /// @@ -20,8 +22,10 @@ internal static class ApplicationCommandEqualityChecks /// Command to check against. /// The discord client. /// Whether the equal check is performed for a guild command. - internal static bool IsEqualTo(this DiscordApplicationCommand ac1, - DiscordApplicationCommand targetApplicationCommand, DiscordClient client, bool isGuild) + internal static bool IsEqualTo( + this DiscordApplicationCommand? ac1, + DiscordApplicationCommand? targetApplicationCommand, DiscordClient client, bool isGuild + ) { if (targetApplicationCommand is null || ac1 is null) return false; @@ -35,18 +39,28 @@ internal static bool IsEqualTo(this DiscordApplicationCommand ac1, ); if (sourceApplicationCommand.DefaultMemberPermissions == Permissions.None && - targetApplicationCommand.DefaultMemberPermissions == null) + targetApplicationCommand.DefaultMemberPermissions == null) sourceApplicationCommand.DefaultMemberPermissions = null; if (isGuild) { sourceApplicationCommand.DmPermission = null; targetApplicationCommand.DmPermission = null; + sourceApplicationCommand.IntegrationTypes = null; + targetApplicationCommand.IntegrationTypes = null; + sourceApplicationCommand.AllowedContexts = null; + targetApplicationCommand.AllowedContexts = null; } else { - sourceApplicationCommand.IntegrationTypes ??= new() { ApplicationCommandIntegrationTypes.InstalledToGuild }; - targetApplicationCommand.IntegrationTypes ??= new() { ApplicationCommandIntegrationTypes.InstalledToGuild }; + sourceApplicationCommand.IntegrationTypes ??= new() + { + ApplicationCommandIntegrationTypes.InstalledToGuild + }; + targetApplicationCommand.IntegrationTypes ??= new() + { + ApplicationCommandIntegrationTypes.InstalledToGuild + }; } client.Logger.Log(ApplicationCommandsExtension.ApplicationCommandsLogLevel, @@ -55,7 +69,7 @@ internal static bool IsEqualTo(this DiscordApplicationCommand ac1, JsonConvert.SerializeObject(targetApplicationCommand)); return ac1.Type == targetApplicationCommand.Type && sourceApplicationCommand.SoftEqual(targetApplicationCommand, - ac1.Type, ApplicationCommandsExtension.Configuration?.EnableLocalization ?? false, isGuild); + ac1.Type, client, ApplicationCommandsExtension.Configuration?.EnableLocalization ?? false, isGuild); } /// @@ -65,10 +79,13 @@ internal static bool IsEqualTo(this DiscordApplicationCommand ac1, /// Source application command. /// Application command to check against. /// The application command type. + /// The discord client. /// Whether localization is enabled. /// Whether the equal check is performed for a guild command. - internal static bool SoftEqual(this DiscordApplicationCommand source, DiscordApplicationCommand target, - ApplicationCommandType type, bool localizationEnabled = false, bool guild = false) + internal static bool SoftEqual( + this DiscordApplicationCommand source, DiscordApplicationCommand target, + ApplicationCommandType type, BaseDiscordClient client, bool localizationEnabled = false, bool guild = false + ) { bool? sDmPerm = source.DmPermission ?? true; bool? tDmPerm = target.DmPermission ?? true; @@ -76,23 +93,24 @@ internal static bool SoftEqual(this DiscordApplicationCommand source, DiscordApp return localizationEnabled ? type switch { - ApplicationCommandType.ChatInput => DeepEqual(source, target, true, sDmPerm, tDmPerm), + ApplicationCommandType.ChatInput => DeepEqual(source, target, client, true, sDmPerm, tDmPerm), _ => source.Name == target.Name - && source.Type == target.Type && source.NameLocalizations == target.NameLocalizations - && source.DefaultMemberPermissions == target.DefaultMemberPermissions - && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw - && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && - source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) + && source.Type == target.Type && source.NameLocalizations == target.NameLocalizations + && source.DefaultMemberPermissions == target.DefaultMemberPermissions + && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw + && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && + source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) && + source.RawNameLocalizations.AreDictionariesEqual(target.RawNameLocalizations) } : type switch { - ApplicationCommandType.ChatInput => DeepEqual(source, target, false, sDmPerm, tDmPerm), + ApplicationCommandType.ChatInput => DeepEqual(source, target, client, false, sDmPerm, tDmPerm), _ => source.Name == target.Name - && source.Type == target.Type - && source.DefaultMemberPermissions == target.DefaultMemberPermissions - && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw - && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && - source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) + && source.Type == target.Type + && source.DefaultMemberPermissions == target.DefaultMemberPermissions + && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw + && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && + source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) }; sDmPerm = null; @@ -100,23 +118,20 @@ internal static bool SoftEqual(this DiscordApplicationCommand source, DiscordApp return localizationEnabled ? type switch { - ApplicationCommandType.ChatInput => DeepEqual(source, target, true, sDmPerm, tDmPerm), + ApplicationCommandType.ChatInput => DeepEqual(source, target, client, true, sDmPerm, tDmPerm), _ => source.Name == target.Name - && source.Type == target.Type && source.NameLocalizations == target.NameLocalizations - && source.DefaultMemberPermissions == target.DefaultMemberPermissions - && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw - && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && - source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) + && source.Type == target.Type && source.NameLocalizations == target.NameLocalizations + && source.DefaultMemberPermissions == target.DefaultMemberPermissions + && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw + && source.RawNameLocalizations.AreDictionariesEqual(target.RawNameLocalizations) } : type switch { - ApplicationCommandType.ChatInput => DeepEqual(source, target, false, sDmPerm, tDmPerm), + ApplicationCommandType.ChatInput => DeepEqual(source, target, client, false, sDmPerm, tDmPerm), _ => source.Name == target.Name - && source.Type == target.Type - && source.DefaultMemberPermissions == target.DefaultMemberPermissions - && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw - && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && - source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes) + && source.Type == target.Type + && source.DefaultMemberPermissions == target.DefaultMemberPermissions + && sDmPerm == tDmPerm && source.IsNsfw == target.IsNsfw }; } @@ -127,13 +142,33 @@ internal static bool SoftEqual(this DiscordApplicationCommand source, DiscordApp /// The source enumerable. /// The target enumerable. /// Whether both nullable enumerable are equal. - internal static bool NullableSequenceEqual(this IEnumerable? source, IEnumerable? target) + internal static bool NullableSequenceEqual(this List? source, List? target) { if (source is not null && target is not null) - return source.OrderBy(x => x).SequenceEqual(target.OrderBy(x => x)); + return source.All(target.Contains) && source.Count == target.Count; + + return source is null && target is null; + } + + /// + /// Checks whether two dictionaries are equal. + /// + /// The source dictionary. + /// The target dictionary. + /// Whether both dictionaries are equal. + internal static bool AreDictionariesEqual(this Dictionary sourceDictionary, Dictionary targetDictionary) + { + if (sourceDictionary?.Count != targetDictionary?.Count) + return false; + + if (sourceDictionary is null && targetDictionary is null) + return true; + + foreach (var kvp in sourceDictionary) + if (!targetDictionary.TryGetValue(kvp.Key, out var value) || value != kvp.Value) + return false; - return (source is null || target is not null) && - (source is not null || target is null); + return true; } /// @@ -142,32 +177,37 @@ internal static bool NullableSequenceEqual(this IEnumerable? source, IEnum /// /// Source application command. /// Application command to check against. + /// The discord client. /// Whether localization is enabled. /// The source dm permission. /// The target dm permission. - internal static bool DeepEqual(DiscordApplicationCommand source, DiscordApplicationCommand target, - bool localizationEnabled = false, bool? sDmPerm = null, bool? tDmPerm = null) + internal static bool DeepEqual( + DiscordApplicationCommand source, DiscordApplicationCommand target, BaseDiscordClient client, + bool localizationEnabled = false, bool? sDmPerm = null, bool? tDmPerm = null + ) { var name = source.Name; var rootCheck = source.Name == target.Name && - source.Description == target.Description && - source.Type == target.Type && - source.DefaultMemberPermissions == target.DefaultMemberPermissions && - sDmPerm == tDmPerm && - source.IsNsfw == target.IsNsfw - && source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && - source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes); + source.Description == target.Description && + source.Type == target.Type && + source.DefaultMemberPermissions == target.DefaultMemberPermissions && + sDmPerm == tDmPerm && + source.IsNsfw == target.IsNsfw && + source.AllowedContexts.NullableSequenceEqual(target.AllowedContexts) && + source.IntegrationTypes.NullableSequenceEqual(target.IntegrationTypes); if (localizationEnabled) rootCheck = rootCheck && - source.NameLocalizations.Localizations.NullableSequenceEqual(target.NameLocalizations.Localizations) && - source.DescriptionLocalizations.Localizations.NullableSequenceEqual(target.DescriptionLocalizations - .Localizations); + source.RawNameLocalizations.AreDictionariesEqual(target.RawNameLocalizations) && + source.RawDescriptionLocalizations.AreDictionariesEqual(target.RawDescriptionLocalizations); - // Compare the Options using recursion var optionsEqual = DeepEqualOptions(source.Options, target.Options, localizationEnabled); + if (optionsEqual.Reason is not null) + client.Logger.Log(ApplicationCommandsExtension.ApplicationCommandsLogLevel, "Inequality found in options of {name} - {reason}", name, optionsEqual.Reason); + if (!rootCheck) + client.Logger.Log(ApplicationCommandsExtension.ApplicationCommandsLogLevel, "Inequality found in root of {name}", name); - return rootCheck && optionsEqual; + return rootCheck && optionsEqual.Equal; } /// @@ -176,17 +216,19 @@ internal static bool DeepEqual(DiscordApplicationCommand source, DiscordApplicat /// Source options. /// Options to check against. /// Whether localization is enabled. - private static bool DeepEqualOptions(IReadOnlyList? sourceOptions, - IReadOnlyList? targetOptions, bool localizationEnabled) + private static (bool Equal, string? Reason) DeepEqualOptions( + IReadOnlyList? sourceOptions, + IReadOnlyList? targetOptions, bool localizationEnabled + ) { if (sourceOptions == null && targetOptions == null) - return true; + return (true, null); if ((sourceOptions != null && targetOptions == null) || (sourceOptions == null && targetOptions != null)) - return false; + return (false, "source or target option null, but not both"); if (sourceOptions!.Count != targetOptions!.Count) - return false; + return (false, "source option count mismatches target option count"); for (var i = 0; i < sourceOptions.Count; i++) { @@ -194,47 +236,47 @@ private static bool DeepEqualOptions(IReadOnlyList x.Name), Formatting.None); var j2 = JsonConvert.SerializeObject(targetOption.Choices.OrderBy(x => x.Name), Formatting.None); if (j1 != j2) - return false; + return (false, "choice mismatch - " + sourceOption.Name); } if ((sourceOption.ChannelTypes is null && targetOption.ChannelTypes is not null) || - (sourceOption.ChannelTypes is not null && targetOption.ChannelTypes is null) || - (sourceOption.ChannelTypes is not null && targetOption.ChannelTypes is not null && - !sourceOption.ChannelTypes.OrderBy(x => x).All(targetOption.ChannelTypes.OrderBy(x => x).Contains))) - return false; + (sourceOption.ChannelTypes is not null && targetOption.ChannelTypes is null) || + (sourceOption.ChannelTypes is not null && targetOption.ChannelTypes is not null && + !sourceOption.ChannelTypes.OrderBy(x => x).All(targetOption.ChannelTypes.OrderBy(x => x).Contains))) + return (false, "channel type mismatch - " + sourceOption.Name); - if (!DeepEqualOptions(sourceOption.Options, targetOption.Options, localizationEnabled)) - return false; + var rec = DeepEqualOptions(sourceOption.Options, targetOption.Options, localizationEnabled); + if (!rec.Equal) + return (false, "Options Recursive - " + sourceOption.Name + " -- " + rec.Reason); if (!optionCheck) - return false; + return (false, "OptionCheck - " + sourceOption.Name); } - return true; + return (true, null); } } From 5fdb41ab268117017d941f71eeb69df6df956710 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Fri, 22 Sep 2023 22:54:30 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bb4f290fc..e831e0c8a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ - Partial support for role subscriptions - Partial support for burst reactions - Full support for onboarding +- Support for default select menu values (THANKS MAISY FOR ADDING IT TO DISCORD) ## Breaking From 6825d961bb71093822ea9f397e55d112b1e8f422 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 24 Sep 2023 12:53:57 +0200 Subject: [PATCH 3/3] fix!: remove privacy level from stage and scheduled event --- DisCatSharp/Clients/DiscordClient.cs | 1 - .../Entities/Guild/DiscordAuditLogObjects.cs | 10 ---------- .../Entities/Guild/DiscordGuild.AuditLog.cs | 18 ----------------- .../ScheduledEvent/DiscordScheduledEvent.cs | 6 ------ .../Guild/Stage/DiscordStageInstance.cs | 6 ------ .../ScheduledEventPrivacyLevel.cs | 18 ----------------- DisCatSharp/Enums/Guild/Stage/.gitkeep | 0 .../Enums/Guild/Stage/StagePrivacyLevel.cs | 20 ------------------- .../Net/Abstractions/AuditLogAbstractions.cs | 6 ------ .../Rest/RestGuildScheduledEventPayloads.cs | 6 ------ 10 files changed, 91 deletions(-) delete mode 100644 DisCatSharp/Enums/Guild/ScheduledEvent/ScheduledEventPrivacyLevel.cs create mode 100644 DisCatSharp/Enums/Guild/Stage/.gitkeep delete mode 100644 DisCatSharp/Enums/Guild/Stage/StagePrivacyLevel.cs diff --git a/DisCatSharp/Clients/DiscordClient.cs b/DisCatSharp/Clients/DiscordClient.cs index 0bf3f5e7a..63716bdb6 100644 --- a/DisCatSharp/Clients/DiscordClient.cs +++ b/DisCatSharp/Clients/DiscordClient.cs @@ -1335,7 +1335,6 @@ private DiscordScheduledEvent UpdateScheduledEvent(DiscordScheduledEvent schedul old.EntityId = scheduledEvent.EntityId; old.EntityType = scheduledEvent.EntityType; old.EntityMetadata = scheduledEvent.EntityMetadata; - old.PrivacyLevel = scheduledEvent.PrivacyLevel; old.Name = scheduledEvent.Name; old.Status = scheduledEvent.Status; old.UserCount = scheduledEvent.UserCount; diff --git a/DisCatSharp/Entities/Guild/DiscordAuditLogObjects.cs b/DisCatSharp/Entities/Guild/DiscordAuditLogObjects.cs index 4e1e08c2c..89cda0ffb 100644 --- a/DisCatSharp/Entities/Guild/DiscordAuditLogObjects.cs +++ b/DisCatSharp/Entities/Guild/DiscordAuditLogObjects.cs @@ -721,11 +721,6 @@ public sealed class DiscordAuditLogStageEntry : DiscordAuditLogEntry /// public PropertyChange TopicChange { get; internal set; } - /// - /// Gets the description of stage instance's privacy level change. - /// - public PropertyChange PrivacyLevelChange { get; internal set; } - /// /// Initializes a new instance of the class. /// @@ -768,11 +763,6 @@ public sealed class DiscordAuditLogGuildScheduledEventEntry : DiscordAuditLogEnt /// public PropertyChange LocationChange { get; internal set; } - /// - /// Gets the privacy level change. - /// - public PropertyChange PrivacyLevelChange { get; internal set; } - /// /// Gets the status change. /// diff --git a/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs b/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs index ec42754c1..e3c780d3f 100644 --- a/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs +++ b/DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs @@ -895,13 +895,6 @@ PropertyChange GetChannelChange() After = xc.NewValueString }; break; - case "privacy_level": - entrysta.PrivacyLevelChange = new() - { - Before = long.TryParse(xc.OldValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t5) ? (StagePrivacyLevel?)t5 : null, - After = long.TryParse(xc.NewValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t6) ? (StagePrivacyLevel?)t6 : null, - }; - break; default: if (this.Discord.Configuration.ReportMissingFields) @@ -1268,17 +1261,6 @@ PropertyChange GetChannelChange() }; break; - case "privacy_level": - p1 = long.TryParse(xc.OldValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t5); - p2 = long.TryParse(xc.NewValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t6); - - entryse.PrivacyLevelChange = new() - { - Before = p1 ? (ScheduledEventPrivacyLevel?)t5 : null, - After = p2 ? (ScheduledEventPrivacyLevel?)t6 : null - }; - break; - case "entity_type": p1 = long.TryParse(xc.OldValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t5); p2 = long.TryParse(xc.NewValue as string, NumberStyles.Integer, CultureInfo.InvariantCulture, out t6); diff --git a/DisCatSharp/Entities/Guild/ScheduledEvent/DiscordScheduledEvent.cs b/DisCatSharp/Entities/Guild/ScheduledEvent/DiscordScheduledEvent.cs index d5d3d216f..8f0cab38d 100644 --- a/DisCatSharp/Entities/Guild/ScheduledEvent/DiscordScheduledEvent.cs +++ b/DisCatSharp/Entities/Guild/ScheduledEvent/DiscordScheduledEvent.cs @@ -116,12 +116,6 @@ public DateTimeOffset? ScheduledEndTime [JsonProperty("scheduled_end_time", NullValueHandling = NullValueHandling.Ignore)] internal string ScheduledEndTimeRaw { get; set; } - /// - /// Gets the privacy level of the scheduled event. - /// - [JsonProperty("privacy_level", NullValueHandling = NullValueHandling.Ignore)] - internal ScheduledEventPrivacyLevel PrivacyLevel { get; set; } - /// /// Gets the status of the scheduled event. /// diff --git a/DisCatSharp/Entities/Guild/Stage/DiscordStageInstance.cs b/DisCatSharp/Entities/Guild/Stage/DiscordStageInstance.cs index 97d7b9031..4fa2dd93b 100644 --- a/DisCatSharp/Entities/Guild/Stage/DiscordStageInstance.cs +++ b/DisCatSharp/Entities/Guild/Stage/DiscordStageInstance.cs @@ -37,12 +37,6 @@ public DiscordGuild Guild [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] public string Topic { get; internal set; } - /// - /// Gets the topic of the Stage instance. - /// - [JsonProperty("privacy_level", NullValueHandling = NullValueHandling.Ignore), DiscordDeprecated("Will be static due to the discovery removal.")] - public StagePrivacyLevel PrivacyLevel { get; internal set; } = StagePrivacyLevel.GuildOnly; - /// /// Gets whether or not stage discovery is disabled. /// diff --git a/DisCatSharp/Enums/Guild/ScheduledEvent/ScheduledEventPrivacyLevel.cs b/DisCatSharp/Enums/Guild/ScheduledEvent/ScheduledEventPrivacyLevel.cs deleted file mode 100644 index 212eb5043..000000000 --- a/DisCatSharp/Enums/Guild/ScheduledEvent/ScheduledEventPrivacyLevel.cs +++ /dev/null @@ -1,18 +0,0 @@ - -namespace DisCatSharp.Enums; - -/// -/// Represents the privacy level for a guild scheduled event. -/// -public enum ScheduledEventPrivacyLevel : int -{ - /// - /// Indicates that the guild scheduled event is public. - /// - Public = 1, - - /// - /// Indicates that the the guild scheduled event is only accessible to guild members. - /// - GuildOnly = 2 -} diff --git a/DisCatSharp/Enums/Guild/Stage/.gitkeep b/DisCatSharp/Enums/Guild/Stage/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/DisCatSharp/Enums/Guild/Stage/StagePrivacyLevel.cs b/DisCatSharp/Enums/Guild/Stage/StagePrivacyLevel.cs deleted file mode 100644 index 7d255a764..000000000 --- a/DisCatSharp/Enums/Guild/Stage/StagePrivacyLevel.cs +++ /dev/null @@ -1,20 +0,0 @@ -using DisCatSharp.Attributes; - -namespace DisCatSharp.Enums; - -/// -/// Represents the privacy level for a stage. -/// -[DiscordDeprecated("Discord removed the feature for stage discovery. Option is defaulting to GuildOnly.")] -public enum StagePrivacyLevel : int -{ - /// - /// Indicates that the stage is public visible. - /// - Public = 1, - - /// - /// Indicates that the stage is only visible to guild members. - /// - GuildOnly = 2 -} diff --git a/DisCatSharp/Net/Abstractions/AuditLogAbstractions.cs b/DisCatSharp/Net/Abstractions/AuditLogAbstractions.cs index 06e9f6c50..41070d3c4 100644 --- a/DisCatSharp/Net/Abstractions/AuditLogAbstractions.cs +++ b/DisCatSharp/Net/Abstractions/AuditLogAbstractions.cs @@ -241,12 +241,6 @@ internal sealed class AuditLogGuildScheduledEvent [JsonProperty("scheduled_end_time")] public string ScheduledEndTime { get; set; } - /// - /// Gets the scheduled event privacy level. - /// - [JsonProperty("privacy_level")] - public ScheduledEventPrivacyLevel PrivacyLevel { get; set; } - /// /// Gets the scheduled event status. /// diff --git a/DisCatSharp/Net/Abstractions/Rest/RestGuildScheduledEventPayloads.cs b/DisCatSharp/Net/Abstractions/Rest/RestGuildScheduledEventPayloads.cs index ab6561ed5..7097ceaf9 100644 --- a/DisCatSharp/Net/Abstractions/Rest/RestGuildScheduledEventPayloads.cs +++ b/DisCatSharp/Net/Abstractions/Rest/RestGuildScheduledEventPayloads.cs @@ -36,12 +36,6 @@ internal sealed class RestGuildScheduledEventCreatePayload : ObservableApiObject [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] public string Description { get; set; } - /// - /// Gets or sets the privacy level of the scheduled event. - /// - [JsonProperty("privacy_level")] - public ScheduledEventPrivacyLevel PrivacyLevel { get; set; } - /// /// Gets or sets the time to schedule the scheduled event. ///