messageUpdate with Partials

I am working on a auditlog feature for my bot, but I ran into a problem when i was working on the messageUpdate handler. I am using message partials so i can see uncatched messages update. But when i try t ofetch oldMessage i get the same content as newMessage. This probably has some stupid easy fix that i just don't understand (i hope).
10 Replies
d.js toolkit
d.js toolkit2w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Syjalo
Syjalo2w ago
You can't fetch old data It simply doesn't exist anymore
slurpy_films
slurpy_filmsOP2w ago
so how do i get the original message
Syjalo
Syjalo2w ago
discord.js gives you what it had in the cache. Discord doesn't give you old data
slurpy_films
slurpy_filmsOP2w ago
ik but i am using partials so the old content is not there
Syjalo
Syjalo2w ago
It's not there because there was no message in the cache. With the partial you tell to discord.hs that you're ready for the structure that has only the id in it. I recommend you read the guide for partial structures
d.js docs
d.js docs2w ago
:guide: Popular Topics: Partial Structures read more
slurpy_films
slurpy_filmsOP2w ago
i have but it dosent say anything about edited messages
Syjalo
Syjalo2w ago
There's a warning at the end of the guide that says you cannot fetch as it is already inaccessible by the time you receive the event The message is already updated. You cannot fetch old data
slurpy_films
slurpy_filmsOP2w ago
hmmm

Did you find this page helpful?