public async Task ViewNomination() { Console.WriteLine("Got view nominations request"); var noms = _nominationsService.GetNominations(); if (!noms.Any()) { return; } var sb = new StringBuilder(); foreach (var n in noms) { sb.AppendLine($"{n.VotingId}. {n.Name}"); } await ReplyAsync(sb.ToString()); }
public async Task Start() { if (!_votingService.VotingOpen()) { if (_nominationsService.GetNominations().Any()) { _votingService.StartVote(); Console.WriteLine("Starting voting session"); await ReplyAsync("Voting has opened!"); await ReplyAsync(_nominationsService.ViewNominationsWithId()); } else { await ReplyAsync("There must be at least one nomination before voting can start!"); } } else { await ReplyAsync("There is already a vote in progress!"); } }