public ILeagueEmbedGenerator CreateChampionSpellsEmbed(ChampionDto champion, Helpers.ChampionDto championDto) { ResetBuilder(); _embedBuilder.WithThumbnailUrl( $"http://ddragon.leagueoflegends.com/cdn/8.19.1/img/champion/{championDto.InternalName}.png"); var spellStringBuilder = new StringBuilder(); _embedBuilder.AddField("Passive", $"**{champion.Passive.Name}**\n{champion.Passive.Description.Replace("<br>", "\n")}"); var keys = new[] { "Q", "W", "E", "R" }; for (var i = 0; i < 4; i++) { var spell = champion.Spells[i]; spellStringBuilder.Clear(); spellStringBuilder.AppendLine($"**{spell.Name}**"); spellStringBuilder.AppendLine($"{spell.Description}"); if (!string.IsNullOrWhiteSpace(spell.CooldownBurn) || spell.CooldownBurn.Equals("0")) { spellStringBuilder.AppendLine($"**Cooldown:** {spell.CooldownBurn}"); } _embedBuilder.AddField(keys[i], spellStringBuilder.ToString()); } return(this); }
public ILeagueEmbedGenerator CreateChampionBuildEmbed(ChampionData championData, Helpers.ChampionDto championDto) { ResetBuilder(); _embedBuilder.WithTitle($"{championDto.Name} for patch {championData.Patch}"); CreateFieldForHash(championData.Hashes.FirstItems, "First Items", true); CreateFieldForHash(championData.Hashes.Items, "Final Build", true); CreateFieldForHash(championData.Hashes.Skills, "Skill Order"); CreateFieldForHash(championData.Hashes.Runes, "Runes", true); CreateFieldForHash(championData.Hashes.Summoners, "Summoners", true); _embedBuilder.WithThumbnailUrl( $"http://ddragon.leagueoflegends.com/cdn/8.19.1/img/champion/{championDto.InternalName}.png"); return(this); }