#Fetch the user who deleted the message
30 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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!
Fetch the AuditLog of the deletion. It there is none it was either the author themselves or a bot
Oh cool
Let me try it
Now the problem is, I deleted my own msg, and it had successfully fetched the log, but it was the wrong log.
How do a avoid this?
Check the timestamp
The "lastPinTimestamp" one?
No, the timestamp the AuditLogsEntry was created
GuildAuditLogsEntry#createdTimestamp
The timestamp this entry was created at
ok..
but here's another problem
As you can see
if someone delete msg for 2 times or above
the method wont work
It does. Just because the view for AuditLogs in discord app amalgamates them into one doesn’t mean there actually is one single log entry
umm
1692619302049 stands for the timestamp of the auditlog
I deleted two msg
but the timestamp are the same
And the rest of the AuditLogEntry?
the rest?
The full instance
Oh, well, guess you should/could check extra.count and .channel then
OK got it