PaginatedMessage not changing files

For some reason, PaginatedMessage doesn't seem to update the file when the page changes. How do I solve this? My code:
const paginated = new PaginatedMessage();
for (const image of images) {
paginated.addPage(async (i, _) => ({
name: `Variant #${i + 1}`,
content: `Card image variant #${i + 1}`,
files: [new AttachmentBuilder(image).setName(`card_${i}.png`).setDescription(`Card image variant #${i}`)]
}));
}
paginated.run(interaction);
const paginated = new PaginatedMessage();
for (const image of images) {
paginated.addPage(async (i, _) => ({
name: `Variant #${i + 1}`,
content: `Card image variant #${i + 1}`,
files: [new AttachmentBuilder(image).setName(`card_${i}.png`).setDescription(`Card image variant #${i}`)]
}));
}
paginated.run(interaction);
4 Replies
Favna
Favna6mo ago
Discord doesn't support editing the attachment on a message, ergo paginated message cannot support it either.
Upsided
UpsidedOP6mo ago
I did an implementation of a simple paginator and it updated the attachments fine though? "fine" is slightly false It worked but it wasn't instantaneous and sometimes it just didn't work I'm not sure why but is there any other way to make the image change on pagination?
Favna
Favna6mo ago
Not sure tbh
Upsided
UpsidedOP6mo ago
The only other way that comes to mind is to use a link to a hosted image in an embed but that seems tedious if i can't change attachments on edit that'll be a problem because my bot is heavily image based ill try to host them ephemerally somehow
Want results from more Discord servers?
Add your server