From a0d6f1fd09755702490057a1d4d735e9eaf367df Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sat, 17 Jun 2023 14:48:49 +0200 Subject: [PATCH] update art to use the image hash fix image embed description --- commands/message/fun/art.js | 4 ++-- labscore/utils/embed.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/message/fun/art.js b/commands/message/fun/art.js index 36ef5f0..55bddbc 100644 --- a/commands/message/fun/art.js +++ b/commands/message/fun/art.js @@ -89,11 +89,11 @@ module.exports = { await response.edit({ embeds: [createEmbed("image", context, { - url: "art.png", + url: res.hash, description: `${codeblock(`py`, [`${DEFAULT_BOT_PREFIX}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`, time: ((Date.now() - timings) / 1000).toFixed(2) })], - files: [{ filename: "art.png", value: image.body }] + files: [{ filename: res.hash, value: image.body }] }) }catch(e){ console.log(e) diff --git a/labscore/utils/embed.js b/labscore/utils/embed.js index 1815d51..134060c 100644 --- a/labscore/utils/embed.js +++ b/labscore/utils/embed.js @@ -112,6 +112,8 @@ module.exports.createEmbed = function(type, context, content){ if(content.provider.icon) emb.footer.iconUrl = content.provider.icon } + if(content.description) emb.description = content.description + if(content.time && emb.footer) emb.footer.text = `${emb.footer.text} • Took ${content.time}s` return emb