Skip to content

RESTAPIAttachment

https://docs.discord.com/developers/resources/message#attachment-object

Signature

export type RESTAPIAttachment = Partial<Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform' | 'id'>> & {    is_spoiler?: boolean | undefined;};

Properties

filename: string;

Name of file attached

title?: string;

The title of the file

duration_secs?: number;

The duration of the audio file (currently for voice messages)

waveform?: string;

Base64 encoded bytearray representing a sampled waveform (currently for voice messages)

is_spoiler?: boolean | undefined;

Whether the attachment should be marked as a spoiler