Skip to content

Commit

Permalink
fix!: remove privacy level from stage and scheduled event
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Sep 24, 2023
1 parent 5fdb41a commit 6825d96
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 91 deletions.
1 change: 0 additions & 1 deletion DisCatSharp/Clients/DiscordClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 0 additions & 10 deletions DisCatSharp/Entities/Guild/DiscordAuditLogObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,6 @@ public sealed class DiscordAuditLogStageEntry : DiscordAuditLogEntry
/// </summary>
public PropertyChange<string> TopicChange { get; internal set; }

/// <summary>
/// Gets the description of stage instance's privacy level change.
/// </summary>
public PropertyChange<StagePrivacyLevel?> PrivacyLevelChange { get; internal set; }

/// <summary>
/// Initializes a new instance of the <see cref="DiscordAuditLogStageEntry"/> class.
/// </summary>
Expand Down Expand Up @@ -768,11 +763,6 @@ public sealed class DiscordAuditLogGuildScheduledEventEntry : DiscordAuditLogEnt
/// </summary>
public PropertyChange<string> LocationChange { get; internal set; }

/// <summary>
/// Gets the privacy level change.
/// </summary>
public PropertyChange<ScheduledEventPrivacyLevel?> PrivacyLevelChange { get; internal set; }

/// <summary>
/// Gets the status change.
/// </summary>
Expand Down
18 changes: 0 additions & 18 deletions DisCatSharp/Entities/Guild/DiscordGuild.AuditLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -895,13 +895,6 @@ PropertyChange<DiscordChannel> 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)
Expand Down Expand Up @@ -1268,17 +1261,6 @@ PropertyChange<DiscordChannel> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ public DateTimeOffset? ScheduledEndTime
[JsonProperty("scheduled_end_time", NullValueHandling = NullValueHandling.Ignore)]
internal string ScheduledEndTimeRaw { get; set; }

/// <summary>
/// Gets the privacy level of the scheduled event.
/// </summary>
[JsonProperty("privacy_level", NullValueHandling = NullValueHandling.Ignore)]
internal ScheduledEventPrivacyLevel PrivacyLevel { get; set; }

/// <summary>
/// Gets the status of the scheduled event.
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions DisCatSharp/Entities/Guild/Stage/DiscordStageInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ public DiscordGuild Guild
[JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)]
public string Topic { get; internal set; }

/// <summary>
/// Gets the topic of the Stage instance.
/// </summary>
[JsonProperty("privacy_level", NullValueHandling = NullValueHandling.Ignore), DiscordDeprecated("Will be static due to the discovery removal.")]
public StagePrivacyLevel PrivacyLevel { get; internal set; } = StagePrivacyLevel.GuildOnly;

/// <summary>
/// Gets whether or not stage discovery is disabled.
/// </summary>
Expand Down

This file was deleted.

Empty file.
20 changes: 0 additions & 20 deletions DisCatSharp/Enums/Guild/Stage/StagePrivacyLevel.cs

This file was deleted.

6 changes: 0 additions & 6 deletions DisCatSharp/Net/Abstractions/AuditLogAbstractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,6 @@ internal sealed class AuditLogGuildScheduledEvent
[JsonProperty("scheduled_end_time")]
public string ScheduledEndTime { get; set; }

/// <summary>
/// Gets the scheduled event privacy level.
/// </summary>
[JsonProperty("privacy_level")]
public ScheduledEventPrivacyLevel PrivacyLevel { get; set; }

/// <summary>
/// Gets the scheduled event status.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ internal sealed class RestGuildScheduledEventCreatePayload : ObservableApiObject
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; set; }

/// <summary>
/// Gets or sets the privacy level of the scheduled event.
/// </summary>
[JsonProperty("privacy_level")]
public ScheduledEventPrivacyLevel PrivacyLevel { get; set; }

/// <summary>
/// Gets or sets the time to schedule the scheduled event.
/// </summary>
Expand Down

0 comments on commit 6825d96

Please sign in to comment.