use the art channel upload for art replies

This commit is contained in:
bignutty 2024-07-24 15:20:33 +02:00
parent 36d1a2211b
commit cf6705cc55

View file

@ -89,7 +89,7 @@ module.exports = {
const image = await superagent.get(res.image_link)
// Upload the image to the labscore art feed channel
await superagent.post(process.env.ART_WEBHOOK)
let artHook = await superagent.post(process.env.ART_WEBHOOK)
.field("payload_json", JSON.stringify({
"content": null,
"embeds": [
@ -102,14 +102,12 @@ module.exports = {
}))
.attach('file[0]', Buffer.from(image.body), res.hash);
return await editOrReply(context, {
embeds: [createEmbed("image", context, {
url: res.hash,
url: artHook.body.embeds[0].image.url,
description: `${codeblock(`py`, [`${DEFAULT_PREFIXES[0]}art -type ${args.type.toLowerCase()} -seed ${seed} -variance ${variance} -rotate ${rotate}`])}`,
time: ((Date.now() - timings) / 1000).toFixed(2)
})],
files: [{ filename: res.hash, value: image.body }]
})]
})
}catch(e){
console.log(e)