diff --git a/commands/interaction/slash/search/google.js b/commands/interaction/slash/search/google.js index 1eac422..83dc320 100644 --- a/commands/interaction/slash/search/google.js +++ b/commands/interaction/slash/search/google.js @@ -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, { diff --git a/commands/message/search/google.js b/commands/message/search/google.js index 5349fde..cbe12b2 100644 --- a/commands/message/search/google.js +++ b/commands/message/search/google.js @@ -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, { diff --git a/labscore/utils/statics.js b/labscore/utils/statics.js index fe1851f..f1b9dd5 100644 --- a/labscore/utils/statics.js +++ b/labscore/utils/statics.js @@ -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),