internal bool?RemoveReaction(SocketUser usr, string vote) { if (PollOptions.Where(x => x.Option == vote) == null) { return(null); } if (PollReactions.Where(x => x.User.Id == usr.Id) == null) { return(false); } PollReactions.Remove(PollReactions.Single(x => x.User.Id == usr.Id && x.PollVote == vote)); return(true); }
internal bool?AddReaction(SocketUser usr, string vote) { if (PollOptions.Where(x => x.Option == vote) == null) { return(null); } if (PollReactions.Where(x => x.User.Id == usr.Id) == null) { return(false); } PollReactions.Add(new PollReaction(usr, vote)); return(true); }