attachment() to send files. Pass a file path or a Buffer. MIME types are detected from the file extension. Override with options.mimeType when you already have the bytes.
options.mimeType, attachment() throws when the content is built.
Attachment IDs
Every resolved attachment carries a stableid. When the attachment originates from a provider, the ID preserves the provider-native identifier, such as an iMessage GUID, Slack file ID, or WhatsApp media ID.
For outbound attachments built with attachment(), Spectrum assigns a random UUID unless you pass options.id:
Attachment and AttachmentInput types are exported from the public API for use in your own type signatures: