diff --git a/commands/interaction/slash/search/wolfram-alpha.js b/commands/interaction/slash/search/wolfram-alpha.js index c5b22c7..edc1542 100644 --- a/commands/interaction/slash/search/wolfram-alpha.js +++ b/commands/interaction/slash/search/wolfram-alpha.js @@ -85,6 +85,7 @@ module.exports = { pages: formatPaginationEmbeds(pages) }); } catch (e) { + if(e.response.body?.error) return editOrReply(context, createEmbed("warning", context, e.response.body.error.message)) console.log(e) return editOrReply(context, createEmbed("error", context, `Unable to perform Wolfram|Alpha search.`)) } diff --git a/commands/message/search/wolfram-alpha.js b/commands/message/search/wolfram-alpha.js index e154db0..4a163f7 100644 --- a/commands/message/search/wolfram-alpha.js +++ b/commands/message/search/wolfram-alpha.js @@ -79,6 +79,7 @@ module.exports = { pages: formatPaginationEmbeds(pages) }); } catch (e) { + if(e.response.body?.error) return editOrReply(context, createEmbed("warning", context, e.response.body.error.message)) console.log(e) return editOrReply(context, createEmbed("error", context, `Unable to perform Wolfram|Alpha search.`)) }