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