Possible fix to #20
All checks were successful
ptero-push / build (push) Successful in 5s

This commit is contained in:
Christopher Cookman 2024-06-22 20:59:27 -06:00
parent 5168c5c582
commit b76a77807b
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -1310,7 +1310,7 @@ discord.on("interactionCreate", async (interaction) => {
} }
// Retruns raw text, paginate it into multiple embeds if needed // Retruns raw text, paginate it into multiple embeds if needed
res.text().then(async (text) => { res.text().then(async (text) => {
const pages = text.match(/[\s\S]{1,2000}(?=\n|$)/g); const pages = text.match(/[\s\S]{1,1900}(?=\n|$)/g);
// const embeds = pages.map((page, ind) => ({ // const embeds = pages.map((page, ind) => ({
// title: `Product Text for ${product_id} Pg ${ind + 1}/${pages.length}`, // title: `Product Text for ${product_id} Pg ${ind + 1}/${pages.length}`,
// description: `\`\`\`${page}\`\`\``, // description: `\`\`\`${page}\`\`\``,