feat: Send contacts (#395)
Introduces the ability to send contact cards. You can send Contacts directly or send a vCard string and it will be automatically parsed. If you'd like to disable this autoparse functionality, you can set `parseVCards: false` as an option while sending a message. close #293
This commit is contained in:
parent
668106be2d
commit
9b096db784
4 changed files with 49 additions and 4 deletions
4
index.d.ts
vendored
4
index.d.ts
vendored
|
|
@ -517,6 +517,8 @@ declare namespace WAWebJS {
|
|||
linkPreview?: boolean
|
||||
/** Send audio as voice message */
|
||||
sendAudioAsVoice?: boolean
|
||||
/** Automatically parse vCards and send them as contacts */
|
||||
parseVCards?: boolean
|
||||
/** Image or videos caption */
|
||||
caption?: string
|
||||
/** Id of the message that is being quoted (or replied to) */
|
||||
|
|
@ -549,7 +551,7 @@ declare namespace WAWebJS {
|
|||
static fromFilePath: (filePath: string) => MessageMedia
|
||||
}
|
||||
|
||||
export type MessageContent = string | MessageMedia | Location
|
||||
export type MessageContent = string | MessageMedia | Location | Contact | Contact[]
|
||||
|
||||
/**
|
||||
* Represents a Contact on WhatsApp
|
||||
|
|
|
|||
Loading…
Reference in a new issue