export class AttachmentBuilderRepresents an attachment builder
Constructors
constructor(attachment: BufferResolvable | Streamdata?: AttachmentData)
attachment: BufferResolvable | Stream
data?: AttachmentData
attachment : BufferResolvable | Stream
The file associated with this attachment.
The duration of the attachment in seconds This is only for voice message attachments.
readonlyspoiler : boolean
Whether or not this attachment has been marked as a spoiler
static from(other: JSONEncodable<AttachmentPayload>) : AttachmentBuilder
other: JSONEncodable<AttachmentPayload>
Makes a new builder instance from a preexisting attachment structure.
setDescription(description: string) : this
description: string
Sets the description of this attachment.
Returns: This attachment
setDuration(duration: number) : this
duration: number
Sets the duration of this attachment. This is only for voice message attachments.
Returns: This attachment
setFile(attachment: BufferResolvable | Streamname?: string) : this
attachment: BufferResolvable | Stream
name?: string
Sets the file of this attachment.
Returns: This attachment
setSpoiler(spoiler?: boolean = true) : this
spoiler?: boolean = true
Sets whether this attachment is a spoiler
Returns: This attachment
setWaveform(waveform: string) : this
waveform: string
Sets the waveform of this attachment. This is only for voice message attachments.
Returns: This attachment