Home > borogove > Client > prepareAttachment

Client.prepareAttachment() method

Turn a file into a ChatAttachment for attaching to a ChatMessage

Signature:

prepareAttachment(source: File): Promise<borogove markdown="1"_ChatAttachment | null>;

Parameters

Parameter Type Description
source File The AttachmentSource to use

Returns:

Promise<borogove_ChatAttachment | null>

Promise resolving to a ChatAttachment or null