public async Task GetStats(SocketMessage message) { string playerName = message.Content.Replace("!stats", "").Trim(); if (playerName.Contains(" ")) { await message.Channel.SendMessageAsync("!خطا : اسم حاویه فاصله است"); } var player = Player.GetPlayerByName(playerName); if (player.Id == null) { await message.Channel.SendMessageAsync("بازیکنی با این نام یافت نشد"); } else { player.GetPlayerStats(); await message.Channel.SendMessageAsync(embed : EmbedHelper.GetStats($"{playerName}'s Solo FPP", player.SoloStats, Color.Red)); await message.Channel.SendMessageAsync(embed : EmbedHelper.GetStats($"{playerName}'s Duo FPP", player.DuoStats, Color.Blue)); await message.Channel.SendMessageAsync(embed : EmbedHelper.GetStats($"{playerName}'s Squad FPP", player.SquadStats, Color.Teal)); } }
public async Task GetStatsCompare(SocketMessage message) { string[] playersName = message.Content.Replace("!compare", "").Trim().Split(" "); if (playersName.Length < 2) { await message.Channel.SendMessageAsync("خطا: اسم 2 بازیکن را وارد کنید!"); } var players = Player.GetPlayersByName(playersName); if (players.Count == 0) { await message.Channel.SendMessageAsync("بازیکنی با این نام ها یافت نشد"); } else { foreach (var player in players) { player.GetPlayerStats(); } await message.Channel.SendMessageAsync(embed : EmbedHelper.GetCompare($"Compare", players, Color.Red)); } }