Пример #1
0
 public async Task VoteToExcommunicate(IUser user)
 {
     if (user != null && _game.IsCommandValid("excommunicate", Context.Channel.Id))
     {
         if (!_game.IsUserPlaying(user.Id))
         {
             await ReplyAsync(ErrorView.PlayerNotPlaying(user.Username));
         }
         else if (!_game.IsUserAlive(user.Id))
         {
             await ReplyAsync(ErrorView.PlayerAlreadyInactive(user.Username));
         }
         else
         {
             await _game.StartExcommunicatePoll(target : user, author : Context.User);
         }
     }
 }