mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
use the art channel upload for art replies
This commit is contained in:
parent
36d1a2211b
commit
cf6705cc55
1 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue