Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }