mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Trigger scheduled event status update code when a ScheduledEventData is created
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
f260681b39
commit
dd31811dff
2 changed files with 3 additions and 3 deletions
|
@ -8,12 +8,12 @@ namespace Boyfriend.Data;
|
|||
/// <remarks>This information is stored on disk as a JSON file.</remarks>
|
||||
public sealed class ScheduledEventData
|
||||
{
|
||||
public ScheduledEventData(GuildScheduledEventStatus status)
|
||||
public ScheduledEventData(GuildScheduledEventStatus? status)
|
||||
{
|
||||
Status = status;
|
||||
}
|
||||
|
||||
public bool EarlyNotificationSent { get; set; }
|
||||
public DateTimeOffset? ActualStartTime { get; set; }
|
||||
public GuildScheduledEventStatus Status { get; set; }
|
||||
public GuildScheduledEventStatus? Status { get; set; }
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
|||
{
|
||||
if (!data.ScheduledEvents.ContainsKey(scheduledEvent.ID.Value))
|
||||
{
|
||||
data.ScheduledEvents.Add(scheduledEvent.ID.Value, new ScheduledEventData(scheduledEvent.Status));
|
||||
data.ScheduledEvents.Add(scheduledEvent.ID.Value, new ScheduledEventData(null));
|
||||
}
|
||||
|
||||
var storedEvent = data.ScheduledEvents[scheduledEvent.ID.Value];
|
||||
|
|
Loading…
Add table
Reference in a new issue