Skip to content

Commit

Permalink
Update GuildEventScheduleService.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinki14 committed Nov 18, 2023
1 parent 219fb9f commit c28f8cd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Miha.Discord/Services/Hosted/GuildEventScheduleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,14 @@ private async Task PostWeeklyScheduleAsync()
.WithAuthor("Weekly event schedule", _client.CurrentUser.GetAvatarUrl());
postedHeader = true;
}

var timeStamp = day
.ToLocalDate()
.AtStartOfDayInZone(_easternStandardZonedClock.GetTzdbTimeZone())
.ToInstant()
.ToDiscordTimestamp(TimestampTagStyles.ShortDate);

_logger.LogInformation("{DateTime}", day.ToLocalDate().AtStartOfDayInZone(_easternStandardZonedClock.GetTzdbTimeZone()).ToInstant().ToUnixTimeSeconds());
description.AppendLine("### " + day.ToString("dddd") + " - " + day.ToLocalDate().AtStartOfDayInZone(_easternStandardZonedClock.GetTzdbTimeZone()).ToInstant().ToDiscordTimestamp(TimestampTagStyles.ShortDate));
description.AppendLine($"### {day.ToString("dddd")} - {timeStamp}");

if (!events.Any())
{
Expand Down Expand Up @@ -216,12 +221,10 @@ private async Task PostWeeklyScheduleAsync()
}
}

embed.WithFooter(day.ToString("dddd"));

if (!postedFooter && day == eventsByDay.Last().Key)
{
embed
//.WithVersionFooter()
.WithVersionFooter()
.WithCurrentTimestamp();

postedFooter = true;
Expand Down

0 comments on commit c28f8cd

Please sign in to comment.