diff --git a/commands/interaction/slash/search/google.js b/commands/interaction/slash/search/google.js index 8631377..7658310 100644 --- a/commands/interaction/slash/search/google.js +++ b/commands/interaction/slash/search/google.js @@ -100,7 +100,7 @@ function createSearchResultPage(context, result, doodle){ if(result.card.type) res.description += `-# ${result.card.type}` - if(result.card.color !== "") res.color = parseInt(result.card.color.substring(1,10), 16) + if(result.card.color && result.card.color !== "") res.color = parseInt(result.card.color.substring(1,10), 16) if(result.card.description !== ""){ res.description += "\n\n" + result.card.description diff --git a/commands/message/search/google.js b/commands/message/search/google.js index 0d3914f..7482056 100644 --- a/commands/message/search/google.js +++ b/commands/message/search/google.js @@ -101,7 +101,7 @@ function createSearchResultPage(context, result, doodle){ if(result.card.type) res.description += `-# ${result.card.type}` - if(result.card.color !== "") res.color = parseInt(result.card.color.substring(1,10), 16) + if(result.card.color && result.card.color !== "") res.color = parseInt(result.card.color.substring(1,10), 16) if(result.card.description !== ""){ res.description += "\n\n" + result.card.description