diff --git a/commands/interaction/slash/search/google.js b/commands/interaction/slash/search/google.js index 67eae18..88be6b1 100644 --- a/commands/interaction/slash/search/google.js +++ b/commands/interaction/slash/search/google.js @@ -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) diff --git a/commands/message/search/google.js b/commands/message/search/google.js index 71e4b66..3cd0a0d 100644 --- a/commands/message/search/google.js +++ b/commands/message/search/google.js @@ -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)