messageDelete event
When I try to delete a message that was sent before I run the client the message that is on the messageDelete event doesn't appear
25 Replies
- 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!btw I added partials and it didn't solve the problem
show your code
ofc
and also note that you wont have access to its content if its a partial
this is the messageDelete event
client ..
the first line
if the message content is empty, you return
which will always be true for a partial
So, how do I get the deleted message to send it ?
if its a partial?
you dont
if its gone its gone
oh i dont send it ?
oh
messageDelete event relies on cache
what about messageUpdate ?
the oldMessage might be a partial
but can be fetched
like this ?
I mean
that should work, not entirely sure
It makes no sense to do that
If you fetch an oldMessage, you get the newMessage
so what should I do
oh right
return void if its partial ?
It really depends what you intend to do with the event
You will always get a complete newMessage
so partial make no sens with newMessage?
understood understood
thank you guys
have a good day
Well it does, if you want to get events for messages that arent in the cache
But if that happens,
oldMessage
will be partial and newMessage
will be completetysm