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