diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventInfo.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventInfo.cs index 20a17b8b3..98112edb9 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventInfo.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventInfo.cs @@ -48,9 +48,9 @@ namespace Discord.Rest /// public ulong? EntityId { get; } /// - /// Gets the metadata for the entity associated with the event. + /// Gets the metadata for the entity associated with the event. if there was no change. /// - public Optional? Location { get; } + public Optional Location { get; } /// /// Gets the count of users interested in this event. /// @@ -60,7 +60,7 @@ namespace Discord.Rest /// public string Image { get; } - internal ScheduledEventInfo(ulong? guildId, ulong? channelId, string name, string description, DateTimeOffset? scheduledStartTime, DateTimeOffset? scheduledEndTime, GuildScheduledEventPrivacyLevel? privacyLevel, GuildScheduledEventStatus? status, GuildScheduledEventType? entityType, ulong? entityId, Optional? location, int? userCount, string image) + internal ScheduledEventInfo(ulong? guildId, ulong? channelId, string name, string description, DateTimeOffset? scheduledStartTime, DateTimeOffset? scheduledEndTime, GuildScheduledEventPrivacyLevel? privacyLevel, GuildScheduledEventStatus? status, GuildScheduledEventType? entityType, ulong? entityId, Optional location, int? userCount, string image) { GuildId = guildId ; ChannelId = channelId ; diff --git a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventUpdateAuditLogData.cs b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventUpdateAuditLogData.cs index 2ea970780..042cfd1c7 100644 --- a/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventUpdateAuditLogData.cs +++ b/src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ScheduledEventUpdateAuditLogData.cs @@ -1,10 +1,8 @@ using System; using System.Linq; -using Discord.API; using Model = Discord.API.AuditLog; using EntryModel = Discord.API.AuditLogEntry; -using Newtonsoft.Json.Linq; namespace Discord.Rest { @@ -52,7 +50,7 @@ namespace Discord.Rest status?.OldValue.ToObject(discord.ApiClient.Serializer), entityType?.OldValue.ToObject(discord.ApiClient.Serializer), entityId?.OldValue.ToObject(discord.ApiClient.Serializer), - location == null ? null : location.OldValue?.ToObject(discord.ApiClient.Serializer) ?? Optional.Unspecified, + location == null ? Optional.Unspecified : new Optional(location.OldValue?.ToObject(discord.ApiClient.Serializer)), userCount?.OldValue.ToObject>(discord.ApiClient.Serializer) .GetValueOrDefault(), image?.OldValue.ToObject>(discord.ApiClient.Serializer) @@ -70,7 +68,7 @@ namespace Discord.Rest status?.NewValue.ToObject(discord.ApiClient.Serializer), entityType?.NewValue.ToObject(discord.ApiClient.Serializer), entityId?.NewValue.ToObject(discord.ApiClient.Serializer), - location == null ? null : location.NewValue?.ToObject(discord.ApiClient.Serializer) ?? Optional.Unspecified, + location == null ? Optional.Unspecified : new Optional(location.NewValue?.ToObject(discord.ApiClient.Serializer)), userCount?.NewValue.ToObject>(discord.ApiClient.Serializer) .GetValueOrDefault(), image?.NewValue.ToObject>(discord.ApiClient.Serializer)