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,
};
let splitIndex = 0;
for (const index in images) {
if (index % 3 == 0) splitIndex++;
out.embeds.push({
title,
url: "https://www.craiyon.com",
url: "https://www.craiyon.com/?" + splitIndex,
image: {
url: `attachment://${index}.jpg`,
},