mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
add color picker card
This commit is contained in:
parent
0f2ac4f8a9
commit
0a36fbe67b
2 changed files with 20 additions and 0 deletions
|
@ -33,6 +33,7 @@ const SEARCH_CARD_TYPES = {
|
|||
UNIT_CONVERTER: 6,
|
||||
DICTIONARY: 7,
|
||||
FUNBOX_COIN_FLIP: 10,
|
||||
FUNBOX_COLOR_PICKER: 11,
|
||||
}
|
||||
|
||||
// TODO: create a favicon() util
|
||||
|
@ -142,6 +143,15 @@ function createSearchResultPage(context, result, doodle){
|
|||
footer: renderFooter(context, doodle)
|
||||
})
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.FUNBOX_COLOR_PICKER:
|
||||
res = createEmbed("default", context, {
|
||||
description: `### ${result.card.title}\n${result.card.components.map((c)=>`${pill(c.label)} ${smallPill(c.content)}`).join('\n')}`,
|
||||
thumbnail: {
|
||||
url: result.card.thumbnail
|
||||
},
|
||||
footer: renderFooter(context, doodle)
|
||||
})
|
||||
break;
|
||||
default:
|
||||
res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue