public static async Tasks.Task NewTask(Account account, Task t, Board b) { var endTaskDate = new DateTime(2019, 8, 27, 16, 13, 0); var timespan = DateTime.Now - endTaskDate; account.CurrentTask = t; account.CurrentBoard = b; var text = $@"You have new task! Priority:${t.Priority} Days left${t.EndDate - DateTime.Now} ..................... It is more important to do Make Presentation Task. You had to close it ${timespan.Minutes} ago! How it is?"; var buttons = new ReplyKeyboardMarkup(new KeyboardButton[] { "I did it!", "Just one moment...", "Oh no, i failed it :(" }); account.Status = AccountStatus.TaskPresentationStatus; await _client.SendTextMessageAsync(account, text, replyMarkup : buttons); }
public async Tasks.Task NotifyExpired(Task task) { var messageText = $"you have expired your task {task.Name} for {(DateTime.Today - task.EndDate.Date).Days}, please close it already"; await _client.SendTextMessageAsync(task.AssignedTo, messageText); }
public async Tasks.Task NotifyDaysLeft(Task task) { var messageText = $"you have {(task.EndDate.Date - DateTime.Today).Days} left to close task {task.Name}, keep going, you are still better then @bananchik_pasha"; await _client.SendTextMessageAsync(task.AssignedTo, messageText); }