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 CreateChampionEmbed(ChampionDto champion, string internalName) { ResetBuilder(); _embedBuilder .WithImageUrl($"http://ddragon.leagueoflegends.com/cdn/img/champion/splash/{internalName}_0.jpg") .AddField(champion.Name, champion.Title) .AddField("Commands", $"User \"-lol spells {champion.Name}\" to get details on what spells {champion.Name} has."); return(this); }