Skip to content

Commit

Permalink
Update BirthdayAnnouncementService.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinki14 committed Nov 4, 2023
1 parent 9d8a56e commit 33f2f26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Miha.Discord/Services/BirthdayAnnouncementService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ private async Task AnnounceBirthdaysAsync()
var birthdayAnnouncementChannel = await _guildService.GetBirthdayAnnouncementChannelAsync(guild.Id);
if (birthdayAnnouncementChannel.IsFailed)
{
// TODO
return;
}

Expand Down Expand Up @@ -121,6 +122,8 @@ private async Task AnnounceBirthdaysAsync()
await _userService.UpsertAsync(userDoc.Value.Id, doc => doc.LastBirthdateAnnouncement = today);
}

// do announcement

var result = await _userService.UpsertAsync(userDoc.Value.Id, doc => doc.LastBirthdateAnnouncement = today);
var delete = await _birthdayJobService.DeleteAsync(birthday.Id);
}
Expand All @@ -135,4 +138,7 @@ private async Task AnnounceBirthdaysAsync()

[LoggerMessage(EventId = 1, Level = LogLevel.Error, Message = "Exception occurred in BirthdayAnnouncementService")]
public partial void LogError(Exception e);

[LoggerMessage(EventId = 2, Level = LogLevel.Error, Message = "Failed to get the configured announcement channel")]
public partial void LogBirthdayAnnouncementChannelFailure();
}

0 comments on commit 33f2f26

Please sign in to comment.