Beispiel #1
0
        public async Task CompareStats(params string[] Players)
        {
            if (Players == null)
            {
                await ReplyAsync(Strings.PlayersNamesRequired);

                return;
            }
            var players = await PubgHelper.GetPlayersByName(Players);

            if (players.Count() == 0)
            {
                await ReplyAsync(Strings.PlayerNotFound);

                return;
            }
            else
            {
                foreach (var player in players)
                {
                    var playerRep = new PlayerRepository(player);
                    await playerRep.GetPlayerStats();

                    player.DuoStats   = playerRep.Player.DuoStats;
                    player.SquadStats = playerRep.Player.SquadStats;
                    player.SoloStats  = playerRep.Player.SoloStats;
                }
                await ReplyAsync(embed : EmbedHelper.GetCompare($"Compare", players, Color.Red));
            }
        }