~ani/~manga searches now have score
This commit is contained in:
		@@ -77,7 +77,8 @@ namespace NadekoBot.Modules.Searches
 | 
				
			|||||||
                    .WithImageUrl(animeData.image_url_lge)
 | 
					                    .WithImageUrl(animeData.image_url_lge)
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Episodes").WithValue(animeData.total_episodes.ToString()).WithIsInline(true))
 | 
					                    .AddField(efb => efb.WithName("Episodes").WithValue(animeData.total_episodes.ToString()).WithIsInline(true))
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Status").WithValue(animeData.AiringStatus.ToString()).WithIsInline(true))
 | 
					                    .AddField(efb => efb.WithName("Status").WithValue(animeData.AiringStatus.ToString()).WithIsInline(true))
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Genres").WithValue(String.Join(", ", animeData.Genres)).WithIsInline(true));
 | 
					                    .AddField(efb => efb.WithName("Genres").WithValue(String.Join(", ", animeData.Genres)).WithIsInline(true))
 | 
				
			||||||
 | 
					                    .WithFooter(efb => efb.WithText("Score: " + animeData.average_score + " / 100"));
 | 
				
			||||||
                await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
 | 
					                await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -99,13 +100,14 @@ namespace NadekoBot.Modules.Searches
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                var embed = new EmbedBuilder().WithColor(NadekoBot.OkColor)
 | 
					                var embed = new EmbedBuilder().WithColor(NadekoBot.OkColor)
 | 
				
			||||||
                    .WithDescription(mangaData.Synopsis)
 | 
					                    .WithDescription(mangaData.Synopsis.Replace("<br>", Environment.NewLine))
 | 
				
			||||||
                    .WithTitle(mangaData.title_english)
 | 
					                    .WithTitle(mangaData.title_english)
 | 
				
			||||||
                    .WithUrl(mangaData.Link)
 | 
					                    .WithUrl(mangaData.Link)
 | 
				
			||||||
                    .WithImageUrl(mangaData.image_url_lge)
 | 
					                    .WithImageUrl(mangaData.image_url_lge)
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Episodes").WithValue(mangaData.total_chapters.ToString()).WithIsInline(true))
 | 
					                    .AddField(efb => efb.WithName("Episodes").WithValue(mangaData.total_chapters.ToString()).WithIsInline(true))
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Status").WithValue(mangaData.publishing_status.ToString()).WithIsInline(true))
 | 
					                    .AddField(efb => efb.WithName("Status").WithValue(mangaData.publishing_status.ToString()).WithIsInline(true))
 | 
				
			||||||
                    .AddField(efb => efb.WithName("Genres").WithValue(String.Join(", ", mangaData.Genres)).WithIsInline(true));
 | 
					                    .AddField(efb => efb.WithName("Genres").WithValue(String.Join(", ", mangaData.Genres)).WithIsInline(true))
 | 
				
			||||||
 | 
					                    .WithFooter(efb => efb.WithText("Score: " + mangaData.average_score + " / 100"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
 | 
					                await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,8 @@ namespace NadekoBot.Modules.Searches.Models
 | 
				
			|||||||
        public string description;
 | 
					        public string description;
 | 
				
			||||||
        public string image_url_lge;
 | 
					        public string image_url_lge;
 | 
				
			||||||
        public string[] Genres;
 | 
					        public string[] Genres;
 | 
				
			||||||
 | 
					        public string average_score;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string Link => "http://anilist.co/anime/" + id;
 | 
					        public string Link => "http://anilist.co/anime/" + id;
 | 
				
			||||||
        public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "...";
 | 
					        public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "...";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,7 @@ namespace NadekoBot.Modules.Searches.Models
 | 
				
			|||||||
        public int total_volumes;
 | 
					        public int total_volumes;
 | 
				
			||||||
        public string description;
 | 
					        public string description;
 | 
				
			||||||
        public string[] Genres;
 | 
					        public string[] Genres;
 | 
				
			||||||
 | 
					        public string average_score;
 | 
				
			||||||
        public string Link => "http://anilist.co/manga/" + id;
 | 
					        public string Link => "http://anilist.co/manga/" + id;
 | 
				
			||||||
        public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "...";
 | 
					        public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "...";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user