public async Task Handle(DailyCheckInitiatedEvent domainEvent) { AppendOnlyStringList messages = new(); await _videosService.DeleteVideosNotExistOnVimeoFromVimeo(messages); await _videosService.DeleteVideosNotExistOnVimeoFromDatabase(messages); await _videosService.UpdateVideosThumbnail(messages); await _dailyCheckPingService.PingAdminsAboutAlmostAlumsIfNeeded(messages); await _alumniGraduationService.GraduateMembersIfNeeded(messages); await _dailyCheckPingService.DeactiveInvitesForExistingMembers(messages); await _dailyCheckPingService.SendPingIfNeeded(messages); // check if number of MemberSubscriptionPlans == expected number await _dailyCheckSubscriptionPlanCountService.WarnIfNumberOfMemberSubscriptionPlansDifferentThanExpected(messages); messages.Append(DAILY_CHECK_COMPLETED_MESSAGE); await SendMessagesToDiscord(messages); await StoreMessagesInTasksCompleted(messages); }
public async Task Handle(DailyCheckInitiatedEvent domainEvent) { AppendOnlyStringList messages = new(); // real stuff // check if admins need to be reminded to avoid renewing near-alumnus's subscription // check if people need upgraded to alumni await _alumniGraduationService.GraduateMembersIfNeeded(messages); // check if people need to be pinged about new member link messages.Append("Daily Check Event Completed"); foreach (var message in messages) { _webhook.Content = message; await _webhook.Send(); } }