Finalizes and returns the built value.
The constructed output
Adds an attachment source to the builder.
File path, URL, Buffer, or Readable stream
Optionalheader: HeadersInitHeader object used for URL downloads (optional)
Saves all attachment streams to a directory or a single file path.
Destination path. If multiple attachments are present,
each file is saved as {filepath}.{index} to avoid collisions.
A promise that resolves when all attachments have been written.
StaticcreateCreates a new builder instance using the concrete subclass.
The builder subclass type
A new instance of the builder
Builder for constructing attachment streams used in message uploads.
Supports multiple input types:
fs.createReadStreamReadable.fromRemarks
URL-based inputs are temporarily written to disk and automatically deleted after streaming completes. This ensures memory efficiency but introduces asynchronous cleanup behavior.