From 39a3820d83f0b08c9f415842c4df4f0a696ec21a Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Fri, 14 Apr 2023 11:41:29 +1000 Subject: [PATCH] aaaaa --- commands/slashcommands/utility/image.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/commands/slashcommands/utility/image.js b/commands/slashcommands/utility/image.js index f52f4f0..2abe039 100644 --- a/commands/slashcommands/utility/image.js +++ b/commands/slashcommands/utility/image.js @@ -35,11 +35,7 @@ module.exports = { }); image_url = response.data.data[0].url; error = response - - } catch(e){ - error = e.response.data.error.message - } - let embed = new Embed({ + let embed = new Embed({ "type": "rich", "title": `Prompt: ${interaction.options.getString("prompt")}`, "description": "", @@ -51,6 +47,11 @@ module.exports = { }, }) - sendResponse(interaction, ``, [embed]) + sendResponse(interaction, ``, [embed]) + } catch(e){ + error = e.response.data.error.message + sendResponse(interaction, e.response.data.error.message) + } + } } \ No newline at end of file