diff --git a/src/Data/ScheduledEventData.cs b/src/Data/ScheduledEventData.cs
index 8af9c92..f03daee 100644
--- a/src/Data/ScheduledEventData.cs
+++ b/src/Data/ScheduledEventData.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Remora.Discord.API.Abstractions.Objects;
namespace Boyfriend.Data;
@@ -8,13 +9,26 @@ namespace Boyfriend.Data;
/// This information is stored on disk as a JSON file.
public sealed class ScheduledEventData
{
- public ScheduledEventData(ulong id, string name, GuildScheduledEventStatus status,
- DateTimeOffset scheduledStartTime)
+ public ScheduledEventData(ulong id, string name, DateTimeOffset scheduledStartTime,
+ GuildScheduledEventStatus status)
{
Id = id;
Name = name;
- Status = status;
ScheduledStartTime = scheduledStartTime;
+ Status = status;
+ }
+
+ [JsonConstructor]
+ public ScheduledEventData(ulong id, string name, bool earlyNotificationSent, DateTimeOffset scheduledStartTime,
+ DateTimeOffset? actualStartTime, GuildScheduledEventStatus? status, bool scheduleOnStatusUpdated)
+ {
+ Id = id;
+ Name = name;
+ EarlyNotificationSent = earlyNotificationSent;
+ ScheduledStartTime = scheduledStartTime;
+ ActualStartTime = actualStartTime;
+ Status = status;
+ ScheduleOnStatusUpdated = scheduleOnStatusUpdated;
}
public ulong Id { get; }
diff --git a/src/Responders/GuildLoadedResponder.cs b/src/Responders/GuildLoadedResponder.cs
index a5b8b19..b3288c0 100644
--- a/src/Responders/GuildLoadedResponder.cs
+++ b/src/Responders/GuildLoadedResponder.cs
@@ -55,7 +55,7 @@ public class GuildLoadedResponder : IResponder
if (!data.ScheduledEvents.TryGetValue(schEvent.ID.Value, out var eventData))
{
data.ScheduledEvents.Add(schEvent.ID.Value, new ScheduledEventData(schEvent.ID.Value,
- schEvent.Name, schEvent.Status, schEvent.ScheduledStartTime));
+ schEvent.Name, schEvent.ScheduledStartTime, schEvent.Status));
continue;
}
diff --git a/src/Responders/ScheduledEventCreatedResponder.cs b/src/Responders/ScheduledEventCreatedResponder.cs
index 36f313a..3541237 100644
--- a/src/Responders/ScheduledEventCreatedResponder.cs
+++ b/src/Responders/ScheduledEventCreatedResponder.cs
@@ -25,7 +25,7 @@ public class ScheduledEventCreatedResponder : IResponder