mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
implement dictionary search card
This commit is contained in:
parent
e0f1ae0dd0
commit
48939503f7
3 changed files with 25 additions and 0 deletions
|
@ -200,6 +200,16 @@ function createSearchResultPage(context, result, doodle){
|
|||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_DICTIONARY:
|
||||
res = createEmbed("default", context, {
|
||||
description: `**${result.dictionary.term}**\n-# ${result.dictionary.phonetics} • ${result.dictionary.word_type}\n\n${result.dictionary.definition}\n\n-# ${result.dictionary.attribution}`,
|
||||
footer: {
|
||||
iconUrl: STATICS.googledictionary,
|
||||
text: `Dictionary • ${context.application.name}`
|
||||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
||||
res = createEmbed("default", context, {
|
||||
|
|
|
@ -202,6 +202,16 @@ function createSearchResultPage(context, result, doodle){
|
|||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.DATA_DICTIONARY:
|
||||
res = createEmbed("default", context, {
|
||||
description: `**${result.dictionary.term}**\n-# ${result.dictionary.phonetics} • ${result.dictionary.word_type}\n\n${result.dictionary.definition}\n\n-# ${result.dictionary.attribution}`,
|
||||
footer: {
|
||||
iconUrl: STATICS.googledictionary,
|
||||
text: `Dictionary • ${context.application.name}`
|
||||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case SEARCH_CARD_TYPES.PIVOT_IMAGES:
|
||||
res = createEmbed("default", context, {
|
||||
|
|
|
@ -68,6 +68,10 @@ const Statics = Object.freeze({
|
|||
file: "brands/google.png",
|
||||
revision: 2
|
||||
},
|
||||
googledictionary: {
|
||||
file: "brands/googledictionary.png",
|
||||
revision: 0
|
||||
},
|
||||
googlefinance: {
|
||||
file: "brands/googlefinance.png",
|
||||
revision: 0
|
||||
|
@ -234,6 +238,7 @@ module.exports.STATICS = Object.freeze({
|
|||
genius: staticAsset(Statics.brands.genius),
|
||||
google: staticAsset(Statics.brands.google),
|
||||
googlelens: staticAsset(Statics.brands.googlelens),
|
||||
googledictionary: staticAsset(Statics.brands.googledictionary),
|
||||
googlefinance: staticAsset(Statics.brands.googlefinance),
|
||||
googlemaps: staticAsset(Statics.brands.googlemaps),
|
||||
googletranslate: staticAsset(Statics.brands.googletranslate),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue