interaction fetchReply attachment URL is different than the actual URL
I'm trying to retrieve the image URL from the attachment using fetchReply, yet the URL/ID seems to be a different one than the one that was actually posted.
console.log url: see image
actual url: https://cdn.discordapp.com/attachments/897014664561578034/1111120710912442448/image.png
Is there a way to get the persistent url for fetching at a later time (so it doesn't get deleted from cache)
9 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Yeah the attachments are meant to be ephemeral
The links aren't ephemeral though would there be a way to get the persistent link? one that hopefully lasts forever
Sorry I'm wrong, it is not meant to be ephemeral
So the link just doesn't work after some time?
Yep correct
If I manually copy link from the message output, it's a different link and that one would be permanent
But the fetchReply gets a different ID somehow
When you edit the image in it should be fetching and creating a new attachment iirc
Oh so I shouldn't edit that post after fetching the url?
I mean the attachment in the edited message should have a new url
Hmmm I could try