class AttachmentBuilder
implements
JSONEncodable<RESTAPIAttachment>export declare class AttachmentBuilder implements JSONEncodable<RESTAPIAttachment>A builder that creates API-compatible JSON data for attachments.
setDescription(description: string) : this
description: string
Sets the description of this attachment.
setDuration(duration: number) : this
duration: number
Sets the duration of this attachment (audio clips).
setFilename(filename: string) : this
filename: string
Sets the filename of this attachment.
setId(id: Snowflake) : this
id: Snowflake
Sets the id of the attachment.
setTitle(title: string) : this
title: string
Sets the title of this attachment.
setWaveform(waveform: string) : this
waveform: string
Sets the waveform of this attachment (audio clips).
toJSON(validationOverride?: boolean) : RESTAPIAttachment
validationOverride?: boolean
Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.