From 0f2ac4f8a9868501293323a13ada8ec08071650a Mon Sep 17 00:00:00 2001 From: bignutty <3515180-bignutty@users.noreply.gitlab.com> Date: Thu, 1 Aug 2024 17:29:42 +0200 Subject: [PATCH] implement coin flip funbox --- commands/interaction/slash/search/google.js | 12 +++++++++++- commands/message/search/google.js | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/commands/interaction/slash/search/google.js b/commands/interaction/slash/search/google.js index bb9e986..faf15b4 100644 --- a/commands/interaction/slash/search/google.js +++ b/commands/interaction/slash/search/google.js @@ -30,7 +30,8 @@ const SEARCH_CARD_TYPES = { ENTITY: 4, CALCULATOR: 5, UNIT_CONVERTER: 6, - DICTIONARY: 7 + DICTIONARY: 7, + FUNBOX_COIN_FLIP: 10, } // TODO: create a favicon() util @@ -132,6 +133,15 @@ function createSearchResultPage(context, result, doodle){ footer: renderFooter(context, doodle) }) break; + case SEARCH_CARD_TYPES.FUNBOX_COIN_FLIP: + res = createEmbed("default", context, { + description: `### Flip a coin\n**${result.result}**!`, + thumbnail: { + url: result.sprite + }, + footer: renderFooter(context, doodle) + }) + break; default: res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type) break; diff --git a/commands/message/search/google.js b/commands/message/search/google.js index 967897b..5ae58c9 100644 --- a/commands/message/search/google.js +++ b/commands/message/search/google.js @@ -31,7 +31,8 @@ const SEARCH_CARD_TYPES = { ENTITY: 4, CALCULATOR: 5, UNIT_CONVERTER: 6, - DICTIONARY: 7 + DICTIONARY: 7, + FUNBOX_COIN_FLIP: 10, } // TODO: create a favicon() util @@ -132,6 +133,15 @@ function createSearchResultPage(context, result, doodle){ footer: renderFooter(context, doodle) }) break; + case SEARCH_CARD_TYPES.FUNBOX_COIN_FLIP: + res = createEmbed("default", context, { + description: `### Flip a coin\n**${result.result}**!`, + thumbnail: { + url: result.sprite + }, + footer: renderFooter(context, doodle) + }) + break; default: res = createEmbed("error", context, "Unknown GoogleResult Type: " + result.type) break;