Help with message deletion

I am currently implementing message deletion logging into my bot to replace another bot that doesn't log attachments upon deletion. I assume that the DAPI passes attachment information along with the rest of the Message object when messages are deleted. However, referencing the attachment via URL wouldn't work because, well, you can't reference a url that doesn't exist anymore. Is there a way to retrieve the raw image data or get a Stream from the Attachment object that is returned with Message#attachments.first()?
Solution:
u can actually use the url because they dont get deleted immediately like the message. i cant remember how long it takes for the attachment url to get deleted though
Jump to solution
3 Replies
Solution
Seren_Modz 21
Seren_Modz 214mo ago
u can actually use the url because they dont get deleted immediately like the message. i cant remember how long it takes for the attachment url to get deleted though
Favna
Favna4mo ago
Also you really don't want to go beyond the URL because that means reuploading it to your own server which in turn can get you into legal trouble if that what was deleted is illegal (think CP for example)
PossiblySebo
PossiblySeboOP4mo ago
yeah i took the url approach just didnt know it was possible the more you know
Want results from more Discord servers?
Add your server