public async Task SendDistributionQuestionAsync() { var gameDate = DateHelper.GetNearestGameDateMoscowTime(DateTime.UtcNow); var message = $"Идёшь на футбол {gameDate.ToRussianDayMonthString()}?"; var markup = MarkupHelper.GetUserDeterminationMarkup(gameDate); await SendMessageToAllUsersAsync(message, markup); }
public override async Task Execute(Message message, MessageController messageController) { Player player; try { player = await messageController.PlayerRepository.GetAsync(message.From.Id); } catch (UserNotFoundException) { await messageController.SendMessageAsync(message.Chat.Id, $"Вы не были зарегистрированы{Environment.NewLine}Введите /reg Фамилия Имя"); return; } var gameDate = DateHelper.GetNearestGameDateMoscowTime(DateTime.UtcNow); var text = $"Идёшь на футбол {gameDate.ToRussianDayMonthString()}?"; await messageController.DeleteMessageAsync(message.Chat.Id, message.MessageId); await messageController.SendMessageAsync(player.ChatId, text, MarkupHelper.GetUserDeterminationMarkup(gameDate)); }