RESTAPIAttachment
Index
Properties
optionaldescription
Description (alt text) for the file (max 1024 characters)
optionalduration_secs
The duration of the audio or video file (required for voice messages)
optionalfilename
Name of file attached
id
Attachment id, for new attachments this must match the n in files[n]
optionalis_spoiler
Whether the attachment should be marked as a spoiler and blurred until clicked, this sets the IS_SPOILER attachment flag
optionaltitle
The title of the file
optionalwaveform
Base64 encoded bytearray representing a sampled waveform (required for voice messages)
This structure is used in Message Create and Edit requests to set which attachments are in the message and provide their metadata.
When editing, you must provide the
idof each file to keep, and you can optionally update thedescriptionandis_spoilerfields of existing attachments.https://docs.discord.com/developers/resources/message#attachment-object-attachment-request-structure