implement images result card

This commit is contained in:
bignutty 2024-09-02 00:14:58 +02:00
parent 1378ab8ec5
commit 70ceb0f8f8
2 changed files with 30 additions and 2 deletions

View file

@ -36,7 +36,8 @@ const SEARCH_CARD_TYPES = {
DATA_GENERIC: 20,
DATA_FINANCE: 21,
DATA_DICTIONARY: 22,
DATA_TRANSLATE: 23
DATA_TRANSLATE: 23,
PIVOT_IMAGES: 100
}
// TODO: create a favicon() util
@ -185,6 +186,19 @@ function createSearchResultPage(context, result, doodle){
}
})
break;
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
res = createEmbed("default", context, {
author: {
name: result.card.title,
iconUrl: result.card.icon
},
image: {
url: result.card.image
},
footer: renderFooter(context, doodle)
})
break;
default:
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)

View file

@ -38,7 +38,8 @@ const SEARCH_CARD_TYPES = {
DATA_GENERIC: 20,
DATA_FINANCE: 21,
DATA_DICTIONARY: 22,
DATA_TRANSLATE: 23
DATA_TRANSLATE: 23,
PIVOT_IMAGES: 100
}
// TODO: create a favicon() util
@ -187,6 +188,19 @@ function createSearchResultPage(context, result, doodle){
}
})
break;
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
res = createEmbed("default", context, {
author: {
name: result.card.title,
iconUrl: result.card.icon
},
image: {
url: result.card.image
},
footer: renderFooter(context, doodle)
})
break;
default:
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)