public async Task RegisterVote(Say e, int vote) { if (ActivePoll != null) { if (await ActivePoll.Vote(e, vote)) { StopVote(); } } else { await Respond(e, "There is no poll going on, start some first"); } }
public async Task RegisterVote(Say e, bool vote) { if (ActivePoll != null) { if (await ActivePoll.Vote(e, vote)) { var oldPoll = ActivePoll; pollTimer.Enabled = false; ActivePoll = null; oldPoll.PublishResult(); } } else { await Respond(e, "There is no poll going on, start some first"); } }