add maps result type

This commit is contained in:
bignutty 2024-09-02 00:41:07 +02:00
parent 70ceb0f8f8
commit 7dc76fed9b
2 changed files with 28 additions and 0 deletions

View file

@ -31,6 +31,7 @@ const SEARCH_CARD_TYPES = {
CALCULATOR: 5,
UNIT_CONVERTER: 6,
DICTIONARY: 7,
MAPS: 8,
FUNBOX_COIN_FLIP: 10,
FUNBOX_COLOR_PICKER: 11,
DATA_GENERIC: 20,
@ -150,6 +151,19 @@ function createSearchResultPage(context, result, doodle){
footer: renderFooter(context, doodle)
})
break;
case SEARCH_CARD_TYPES.MAPS:
res = createEmbed("default", context, {
author: {
name: result.card.title,
iconUrl: result.card.icon,
url: result.card.url
},
image: {
url: result.card.image
},
footer: renderFooter(context, doodle)
})
break;
case SEARCH_CARD_TYPES.FUNBOX_COIN_FLIP:
res = createEmbed("default", context, {
description: `### Flip a coin\n**${result.result}**!`,

View file

@ -33,6 +33,7 @@ const SEARCH_CARD_TYPES = {
CALCULATOR: 5,
UNIT_CONVERTER: 6,
DICTIONARY: 7,
MAPS: 8,
FUNBOX_COIN_FLIP: 10,
FUNBOX_COLOR_PICKER: 11,
DATA_GENERIC: 20,
@ -152,6 +153,19 @@ function createSearchResultPage(context, result, doodle){
footer: renderFooter(context, doodle)
})
break;
case SEARCH_CARD_TYPES.MAPS:
res = createEmbed("default", context, {
author: {
name: result.card.title,
iconUrl: result.card.icon,
url: result.card.url
},
image: {
url: result.card.image
},
footer: renderFooter(context, doodle)
})
break;
case SEARCH_CARD_TYPES.FUNBOX_COIN_FLIP:
res = createEmbed("default", context, {
description: `### Flip a coin\n**${result.result}**!`,