site
site copied to clipboard
Attachment management
The current Discohook file features are heavily outdated compared with Discord API features.
Despite it's allowed by API you cannot remove or replace message attachments. Every time when you click Edit a new attachment adds to message.
The message could be synchronized with attachments:[] field, but then you should reupload files every time when you want to edit a message.
The ideal solution is to fetch previously sent message using referenceUrl to get current attachments. With that you could easily replace and remove attachments with attachments:[...] fields in PATCH payload.