fix !google
This commit is contained in:
parent
290b85fdb6
commit
0b7303d576
3 changed files with 4 additions and 4 deletions
|
@ -48,13 +48,13 @@ namespace Geekbot.net.Commands.Integrations.Google
|
|||
return;
|
||||
}
|
||||
|
||||
var data = response.ItemListElement.First().ResultDto;
|
||||
var data = response.ItemListElement.First().Result;
|
||||
var eb = new EmbedBuilder();
|
||||
eb.Title = data.Name;
|
||||
if(!string.IsNullOrEmpty(data.Description)) eb.WithDescription(data.Description);
|
||||
if(!string.IsNullOrEmpty(data.DetailedDtoDescription?.Url)) eb.WithUrl(data.DetailedDtoDescription.Url);
|
||||
if(!string.IsNullOrEmpty(data.DetailedDtoDescription?.ArticleBody)) eb.AddField("Details", data.DetailedDtoDescription.ArticleBody);
|
||||
if(!string.IsNullOrEmpty(data.ImageDto?.ContentUrl)) eb.WithThumbnailUrl(data.ImageDto.ContentUrl);
|
||||
if(!string.IsNullOrEmpty(data.Image?.ContentUrl)) eb.WithThumbnailUrl(data.Image.ContentUrl);
|
||||
|
||||
await ReplyAsync("", false, eb.Build());
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public class GoogleKgApiElementDto
|
||||
{
|
||||
public GoogleKgApiResultDto ResultDto { get; set; }
|
||||
public GoogleKgApiResultDto Result { get; set; }
|
||||
public double ResultScore { get; set; }
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public GoogleKgApiImageDto ImageDto { get; set; }
|
||||
public GoogleKgApiImageDto Image { get; set; }
|
||||
public GoogleKgApiDetailedDto DetailedDtoDescription { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue