misc.generate: split embeds every 3 images

This commit is contained in:
Cynthia Foxwell 2022-07-04 19:38:26 -06:00
parent 8f016f7361
commit 4df473339d

View file

@ -430,10 +430,12 @@ generate.callback = async function (msg, line) {
file: images, file: images,
}; };
let splitIndex = 0;
for (const index in images) { for (const index in images) {
if (index % 3 == 0) splitIndex++;
out.embeds.push({ out.embeds.push({
title, title,
url: "https://www.craiyon.com", url: "https://www.craiyon.com/?" + splitIndex,
image: { image: {
url: `attachment://${index}.jpg`, url: `attachment://${index}.jpg`,
}, },