update art to use the image hash

fix image embed description
This commit is contained in:
derpystuff 2023-06-17 14:48:49 +02:00
parent d61e3aa185
commit a0d6f1fd09
2 changed files with 4 additions and 2 deletions

View file

@ -89,11 +89,11 @@ module.exports = {
await response.edit({ await response.edit({
embeds: [createEmbed("image", context, { 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}`])}`, description: `${codeblock(`py`, [`${DEFAULT_BOT_PREFIX}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
time: ((Date.now() - timings) / 1000).toFixed(2) time: ((Date.now() - timings) / 1000).toFixed(2)
})], })],
files: [{ filename: "art.png", value: image.body }] files: [{ filename: res.hash, value: image.body }]
}) })
}catch(e){ }catch(e){
console.log(e) console.log(e)

View file

@ -112,6 +112,8 @@ module.exports.createEmbed = function(type, context, content){
if(content.provider.icon) emb.footer.iconUrl = content.provider.icon 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` if(content.time && emb.footer) emb.footer.text = `${emb.footer.text} • Took ${content.time}s`
return emb return emb