#get deleted message in AuditLogCreate

8 messages · Page 1 of 1 (latest)

gleaming cipher
#

How to get Deleted Message in AuditLogCreate Event.

sweet violet
#

• 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.

glass burrow
#

the audit log does not show the message that was deleted. It usually shows if the message was deleted by another user and the count if it was multiple

#

I haven’t worked with audit logs so I would need to check how to get exactly when the words “message deleted” is shown there

#

You would use AuditLogEvent.MessageDelete for the auditLogEntry param

abstract gladeBOT
novel glen
#

Audit logs dont store the content of deleted messages

atomic talon
#

An attempted would be to listen to the messageDelete Event, store meanwhile all audit logs that come in with the message delete type in a collection or array or whatever, and then after a couple of seconds (so that you can be sure that the audit log arrived via gateway) you try to find the matching audit log entry by searching in the audit log collection/entry after that ID