From bb2c2eb8707d279f3540ace7bdcb70ae9737871f Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Wed, 27 Sep 2023 20:24:16 +0200 Subject: [PATCH] publish all art creations to the wallpaper channel --- commands/message/fun/art.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/commands/message/fun/art.js b/commands/message/fun/art.js index c5895fc..3c33782 100644 --- a/commands/message/fun/art.js +++ b/commands/message/fun/art.js @@ -87,6 +87,21 @@ 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) + .field("payload_json", JSON.stringify({ + "content": null, + "embeds": [ + createEmbed("image", context, { + 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) + }) + ] + })) + .attach('file[0]', Buffer.from(image.body), res.hash); + + return await editOrReply(context, { embeds: [createEmbed("image", context, { url: res.hash,